Re: wacky object idea

From: Date: Tue, 29 Aug 2000 17:56:59 +0000
Subject: Re: wacky object idea
References: 1 2 3 4 5 6 7 8 9 10 11 12 13 14  Groups: php.dev 
Request: Send a blank email to php-dev+get-31098@lists.php.net to get a copy of this message
At 18:55 29-08-00, Hartmut Holzgraefe wrote:
Zeev Suraski wrote: These are more or less the only text-book examples that there are; It's no coincidence that these are ALWAYS the examples given for overloaded operators. For most part, operator overloading is bad, and if the price is losing 'neat' notation for complex numbers, it's a worthy price, IMHO. won't need them in PHP, sure, but as somone who has done developement on scientific and engineering applications i have to *strongly* disagree with the argumentation above users who can really benefit from a given feature should not be punished for the only reason that others might misuse it to shoot themselves in the foot
Well, in my opinion, it's not a matter of 'punishment'. If a certain language encourages you to do something (by giving you an easy way of doing it), and that something can be very easily misused - it's a bad feature, and makes the language worse. That's regardless of whether it can be also used for some good things. C++ could have added native support for complex numbers if it was considered important enough, for instance. The fact you have full operator overloading (including operators that have nothing to do with math overloading, such as [] or ->) made lots of people misuse it. Zeev -- Zeev Suraski <zeev@zend.com> http://www.zend.com/

« previous php.dev (#31098) next »