Re: Implementation (simple!) operator overloading
| From: | ggInternet) | Date: | Mon, 10 Jul 2000 07:36:59 +0000 |
| Subject: | Re: Implementation (simple!) operator overloading | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-23998@lists.php.net to get a copy of this message | ||
Well, you do the overloading yourself right,
you write the function to be called when we encounter an
overloaded function..
On Mon, 10 Jul 2000, Emiliano wrote:
>
>
> > Uhm, unreadable?
> > the &?& stuff was unreadable, this to my opinion is
> > pretty much straight to the point.. add/substract something
> > from an object and cause a function to be called for this..
> > I think you'd make the C++ programmers happy:-)
>
> What I dislike about operator overloading is how they can mean
> different things to different people. Since the operator doesn't say what
> it does, that makes the code less readable unless you did the overloading
> yourself so you _know_ what it is going to do. Given a date object $d and
> a person object $p, what does $d + $p mean? Or $d * $p?
>
> Emile
>
>
> --
> PHP Development Mailing List <http://www.php.net/>
> To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net
> For additional commands, e-mail: php-dev-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>