Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:48198 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 31493 invoked from network); 4 May 2010 14:19:35 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 May 2010 14:19:35 -0000 Authentication-Results: pb1.pair.com header.from=nlgordon@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=nlgordon@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.42 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: nlgordon@gmail.com X-Host-Fingerprint: 74.125.82.42 mail-ww0-f42.google.com Received: from [74.125.82.42] ([74.125.82.42:55645] helo=mail-ww0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 4E/B3-12067-4FC20EB4 for ; Tue, 04 May 2010 10:19:33 -0400 Received: by wwb34 with SMTP id 34so2489444wwb.29 for ; Tue, 04 May 2010 07:19:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=8w0bnLyZhqtc6PcM+393UNYjO6GQgILv5xZgCX9EGYw=; b=rmEvmRclgAa80ZpFd4EryA4j604ca6jhZK2b5u6q3Ofn2rF8kLhkI5pH2I1uuvdlSS fpujFfyx5v5WY5BKsEcG19YnLZgDZ0Tm1wMRX747L9ygAKMsJP9cDZQ4cBR5eMatxRCZ oD5UoGCmfGapZ6bXyMjtM59VO0IydzHQmJ86Y= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=K6RYbdJUSEZBGMI4dBmCDeOgADmyIFQ/t9MnGJ/w0qnHyMV6FZIybv6kgWtrce50yj BoKHuW0/uoMIHCPqWmxQcLqYrdBmaAfvNbyOmEnU86x8nE1r+CNnv0U+K0h6LqIgsIfI PAgxbzSAluDweoxtjV0O2MZ/1oFCSqMlguzK8= MIME-Version: 1.0 Received: by 10.216.88.4 with SMTP id z4mr2969129wee.121.1272982768628; Tue, 04 May 2010 07:19:28 -0700 (PDT) Received: by 10.216.165.85 with HTTP; Tue, 4 May 2010 07:19:28 -0700 (PDT) In-Reply-To: References: Date: Tue, 4 May 2010 09:19:28 -0500 Message-ID: To: Etienne Kneuss Cc: Moriyoshi Koizumi , internals@lists.php.net Content-Type: multipart/alternative; boundary=0016e6d99efabab4a20485c565ce Subject: Re: [PHP-DEV] Autoboxing in PHP From: nlgordon@gmail.com (Nate Gordon) --0016e6d99efabab4a20485c565ce Content-Type: text/plain; charset=UTF-8 On Tue, May 4, 2010 at 9:12 AM, Etienne Kneuss wrote: > Hi, > > On Tue, May 4, 2010 at 5:48 AM, Moriyoshi Koizumi 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? :wq --0016e6d99efabab4a20485c565ce--