Re: Autoboxing in php 5.1
| From: | Derick Rethans | Date: | Thu, 10 Feb 2005 12:33:26 +0000 |
| Subject: | Re: Autoboxing in php 5.1 | ||
| References: | 1 2 3 4 5 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-14789@lists.php.net to get a copy of this message | ||
On Thu, 10 Feb 2005, Ante Drnasin wrote:
> Andrei Zmievski wrote:
> > On Wed, 09 Feb 2005, Ante Drnasin wrote:
> >
> >>Hi Marcus and thanx for the explanation....
> >>
> >>And I agree that PHP is very loose which is his strong part but
> >>exactly because of that I think it would be nice if the end-user can have
> >>the ability to work with primitives like they were objects...
> >
> >
> > Why?
> >
> > - Andrei
>
> 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...
But there is no good reason why we should add this.
>
> 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);
> }
function add($a, $b) {
return (float)($a + $b);
}
nothing new to add here...
Derick
--
Derick Rethans
http://derickrethans.nl | http://ez.no | http://xdebug.org