Re: Implementation (simple!) operator overloading
| From: | Emiliano | Date: | Mon, 10 Jul 2000 07:46:14 +0000 |
| Subject: | Re: Implementation (simple!) operator overloading | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-23997@lists.php.net to get a copy of this message | ||
> 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