On Tue, May 4, 2010 at 9:12 AM, Etienne Kneuss <webmas...@colder.ch> wrote:
> Hi, > > On Tue, May 4, 2010 at 5:48 AM, Moriyoshi Koizumi <m...@mozo.jp> wrote: > > Hey, > > > > Just to let you know about a new RFC for adding autoboxing feature in > PHP. > > Look at http://wiki.php.net/rfc/autoboxing . > > > It looks like a very interesting idea. However, I believe that we > should learn from the __autoload experience: It does not cope well > with multiple projects. I'd rather have register_autoboxer($callback) > or even register_autoboxer("type", $callback); for instance, so that > many projects could have their own autoboxer. > In general I would agree that allowing multiple instances of __auto* is a good thing, but with __autoload you are loading class names that have far more diversity than basic types. If my code relies on int being boxed with MyInt, but I use a library that wants to box it as ProjectInt we could have some very odd results that would appear to be very magical. Confining it to a namespace sounds like a potentially better solution to me than a global registry. > Best, > > > > > Regards, > > Moriyoshi > > > > -- > > PHP Internals - PHP Runtime Development Mailing List > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > > > -- > Etienne Kneuss > http://www.colder.ch > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > -- -Nathan Gordon If the database server goes down and there is no code to hear it, does it really go down? <esc>:wq<CR>