This project will implement several APIs and one thing that I would like to build into the design of those APIs is type enforcement. PHP has type hinting but only for classes and arrays. In order to strongly type a variable you have to use functions like is*() and settype() etc. and throw your own errors throughout all of your code. It would be ideal if I could create classes for various types and use operator overloading to perform operations without having to use methods or do a lot of type checking that might be forgotten, done incorrectly and, at the very least, clutter up the code.
Upon doing some reading it seems that there is very strong opposition from the PHP developers to include operator overloading in any near future version. From the Zend website:
"Jason Greene was interested in seeing the engine adopt some form of operator overloading. Both Andrei Zmievski and Zeev Suraski agreed that although this feature might have a chance at being useful, it would very likely make things far too complex. At this stage, it is highly doubtful Operator overloading will make it into the second version of the engine — if ever."
So my question is: what does Slashdot think ? Would PHP benefit from operator overloading or would it "make things far too complex" ?"