Re: Autoboxing in php 5.1

From: Date: Wed, 09 Feb 2005 09:30:14 +0000
Subject: Re: Autoboxing in php 5.1
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-14744@lists.php.net to get a copy of this message
Hello Ante, autoboxing is an ugly java 1.5 workarount to enable storage of base tyoes in containers. There this trick is necessary because as always in java everything must be an 'Object'. In contrast PHP is a loosly typed language where a container aka array can store any type. Apart from that as with java there is no user space enabled way to implement such autoboxing types and even the java way of building it into the engine is not supported and won't be. regards marcus Monday, February 7, 2005, 3:21:59 PM, you wrote: > I was wondering if anyone can comment on this idea > cause I think it would be a great asset to PHP and to OOP in PHP.. > example: > $b = 4; > $a = new Integer(4); > if($a == $b) { > //bla bla > } > Other classes would include String(), Integer(), Boolean() ... and so on... -- Best regards, Marcus mailto:helly@php.net

« previous php.internals (#14744) next »