11-29-2007, 11:34 AM
|
#22 (permalink)
|
|
The Wanderer
Join Date: Nov 2007
Location: Lviv, Ukraine
Posts: 5
Thanks: 0
|
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.
|
|
|