Re: Implementation (simple!) operator overloading
| From: | Emiliano | Date: | Mon, 10 Jul 2000 08:44:28 +0000 |
| Subject: | Re: Implementation (simple!) operator overloading | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-24009@lists.php.net to get a copy of this message | ||
> > I like OO capabilities in PHP, am using them more and more. But operator
> > overloading != OOP.
>
> Well, in my implementation it is, you can only specify
> operator overloading functions in a class and for now
> in this situation: $c = $a + $b; It'd only work when $a == IS_OBJECT;
>
> This way: $c = 10 + 10; isn't getting a different meaning.
It still doesn't tell me what $b is and what $c will be.
> This is the way it works right now.. (code is done, yes.)
> But ehm, the PHP OO stuff like I would be willing to add stuff
> to it, since I like messing around with it.. But I'd fall back on
> C++ features again, private vars, protected vars, public vars..
>
> With you all loving java I figure you don't like this, do you :-)
Private vars would be a Good Thing, protected should have never made it to
the C++ spec. IMHO of course.
Emile