Hm, I'm surprised by this response from someone who's name I recognise as an
active PHP contributor. The answer strikes me as either arrogant and/or
ignorant (note: I'm not saying you are that, but that's how the reply comes
across, given what what operator overloading is about). As I've pointed out
in other postings in this thread, operator overloading is about much more
than "just" "syntactic sugar". In C++, for example, it enables important
things such as function objects (being able to pass an object to a function,
for example, and have it behave as a function, enabling functional
programming, as well). This is not possible (possibly without jumping
through major hoops) in PHP.
That's because functions are not first-class objects in PHP. You can do this same thing in straight C without operator overloading. While I'm happy (for you) that you like operator overloading, the view that it is inherently evil and leads to obtuse, magical code is not relegated to us PHP luddites. These ideas have all been discussed in depth long before you appeared on the scene to decry our lack of interest in 'evolving' the language to your liking.
George
-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php