Re: PHP 5.1

From: Date: Fri, 04 Feb 2005 01:00:26 +0000
Subject: Re: PHP 5.1
References: 1 2 3 4 5  Groups: php.internals 
Request: Send a blank email to internals+get-14626@lists.php.net to get a copy of this message
At 11:23 AM 2/3/2005 +0100, Derick Rethans wrote:
On Thu, 3 Feb 2005, Sebastian Bergmann wrote: Derick Rethans wrote:
This adds operator overloading to user classes?
Yes, have a look at Johannes' Complex example [1]. Okay, mega Yuck then. Although it looks cool, I consider it as a bad practise. It confuses the hell out of people that they can add two objects. Use C++/Java if you want this...
BTW, in general Java also decided that it sucks. Except for + which is a bit magical it also requires to use verbose methods. This is a big time/life saver because operator overloading is very confusing and obscure. I think it's only nice in theory and not in real world usage. Andi

« previous php.internals (#14626) next »