Re: PHP 5.1 - operator overloading
| From: | Terje Slettebø | Date: | Mon, 07 Feb 2005 20:10:15 +0000 |
| Subject: | Re: PHP 5.1 - operator overloading | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-14696@lists.php.net to get a copy of this message | ||
>From: "Stanislav Malyshev" <stas@zend.com>
> TS>>No, you don't have to go that far. For starters, one could allow
function
> TS>>(and possibly operator) overloading, based on type hints. The
following is
> TS>>legal PHP5:
>
> That will already open the can of worms. And make each function call to go
> through all the hoops of signature matching.
Yes, that is a concern, especially when it's done at run-time.
> TS>>overload resolution. However, how much on an impact this would have on
> TS>>execution speed remains to be seen.
>
> Exactly. Do you have any base to claim the speed impact would not be
> serious? Bring it forward.
No, which is why I said that it "remains to be seen" what impact it would
have, which means I'm not claiming anything one way or the other.
> TS>>It was a reaction to the oft-mentioned argument that essentially says:
"We
> TS>>don't need more advanced features." I got that feeling when you said
"Using
>
> Nobody ever said "we don't need more advanced features". You know
> perfectly it is not true. What was said is that we probably don't need
> *this particular* feature. This has no relation to discussion of any other
> feature or discussion about having features in general.
True.
Anyway, there have been requests for ending this sub-thread on overloading,
etc., so I suggest that any further discussion, should it be wanted, is done
off-list.
Regards,
Terje