Hi,

Christoph M. Becker wrote:
(frankly, I would not have not supported __concat() at all).  Also,
overloaded operators should be programmed defensively, i.e. they should
not accept arbitrary arguments (how could that even work?), but only
those they can handle.  If implementations adhere to these "rules", I
don't see real issues.

Consider a type implementing some kind of list. Perhaps someone would want to overload the + operator to mean adding an item to the list. If the list accepts any type of value as a valid item, then you have an example of an unconditional overload.

Regards,
Andrea

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to