Re: wacky object idea
| From: | Hartmut Holzgraefe | Date: | Tue, 29 Aug 2000 18:52:54 +0000 |
| Subject: | Re: wacky object idea | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-31105@lists.php.net to get a copy of this message | ||
Zeev Suraski wrote:
> 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.
depends on the language, too
nobody is going to create engineering scientific applications
using PHP (now) but a general use weapon like C++ is used in
sci/eng a lot and math operator overloading improves readability,
usability and correctnes of implementation a big lot
so if others missuse operators in non-intuitives ways (although
they have been warned) it _is_ their own fault
> C++ could have added native support for complex numbers if it was
> considered important enough, for instance.
and matrices, unit-proof operations (doesn't make sense to
add meters and seconds, so why not check it), quaternions ...
... so lets create a general way to implement all theese in
user land
> 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.
yes, theese make up real good ammunition for 'obfuscated competitions'
:(
but to get it really funny you have to have 'full full' operator
overloading or 'operator creation' so that you can create 'pow',
'mod' or 'something' operators like in ELAN
PS:
maybe we should implement the rule suggested in Stroustrups
"The Design and Implementation of C++" and have everyone who
suggests a new feature bet a kidney on that it will be accepted
won't protect us from stupid requests, but nobody will suggest
a silly thing more than twice
--
Hartmut Holzgraefe
hartmut@six.de http://www.six.de +49-711-99091-77 fax:-99