At 09:08 AM 2/10/2005 +0100, Ante Drnasin wrote:
Why not?

Because it would be a great asset to the new OOP model in PHP 5....
Because the new OOP model is great and I don't think it shouldn't stop there....
Because it would be great if the choice is left to the end user...


We already have OOP freaks (including this one) and I just love the idea
to have something like

function Add($a, $b) {
  return new Float($a+$b);
}

print(Add(new Integer(5), new Float(5.7)));

I don't think we should support it just because you're an OOP freak and think it's cool.
Actually I see no good reason to do it in PHP. A good reason to have it in Java is because it gives you the option to also set it to NULL. In PHP you don't have that problem.
It goes very much against the PHP spirit of dynamic typing and just bloats things.
(/me having done a huge project in J2EE a while ago where moving from large composite objects using classes like Integers to native types solved serious scalability problems :)



Andi

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



Reply via email to