Thread: PHP6 Wishlist
View Single Post
Old 11-29-2007, 11:34 AM   #22 (permalink)
C01t
The Wanderer
Newcomer 
 
C01t's Avatar
 
Join Date: Nov 2007
Location: Lviv, Ukraine
Posts: 5
Thanks: 0
C01t is on a distinguished road
Default Operator Overloading

Namespaces should be!!! And it's already more that just a script language!!!

But I can't figure out why not to add operator overloading.
I think that if we have array access through iterators in SPL, so they can introduce something like MathInterface witch will allow overloading of operators.

Simply like:
PHP Code:
class foo implements AddOperator
{
    public function 
operatorAdd(foo &$object
    {
        
/* @todo adding does here */
    
}

If array access is posible then that is possible too
__________________
Never trust anything that can think for itself if you can't see where it keeps its brain.
ŠJ. K. Rowling

Last edited by C01t : 11-29-2007 at 02:24 PM.
Send a message via ICQ to C01t Send a message via MSN to C01t Send a message via Yahoo to C01t Send a message via Skype™ to C01t
C01t is offline  
Reply With Quote