Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:48195 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 21452 invoked from network); 4 May 2010 14:01:14 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 May 2010 14:01:14 -0000 Authentication-Results: pb1.pair.com smtp.mail=c.r1@gmx.de; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=c.r1@gmx.de; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmx.de designates 213.165.64.20 as permitted sender) X-PHP-List-Original-Sender: c.r1@gmx.de X-Host-Fingerprint: 213.165.64.20 mail.gmx.net Received: from [213.165.64.20] ([213.165.64.20:53168] helo=mail.gmx.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 4F/91-12067-9A820EB4 for ; Tue, 04 May 2010 10:01:14 -0400 Received: (qmail invoked by alias); 04 May 2010 14:01:09 -0000 Received: from p54A4BDD8.dip.t-dialin.net (EHLO [192.168.2.231]) [84.164.189.216] by mail.gmx.net (mp049) with SMTP; 04 May 2010 16:01:09 +0200 X-Authenticated: #26239675 X-Provags-ID: V01U2FsdGVkX1/rqhZ3iBDrQsB9K9gUfYaAKrVtSweFeXTazIfrgZ hoYLZDdqRoxpLa Message-ID: <4BE028A2.2030201@gmx.de> Date: Tue, 04 May 2010 16:01:06 +0200 User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de-DE; rv:1.9.1.8) Gecko/20100227 Lightning/1.0b1 Thunderbird/3.0.3 MIME-Version: 1.0 To: Moriyoshi Koizumi CC: internals@lists.php.net References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-FuHaFi: 0.63 Subject: Re: [PHP-DEV] Autoboxing in PHP From: c.r1@gmx.de (Cornelius) Am 04.05.2010 05:48, schrieb Moriyoshi Koizumi: > Hey, > > Just to let you know about a new RFC for adding autoboxing feature in PHP. > Look at http://wiki.php.net/rfc/autoboxing . > > Regards, > Moriyoshi > Hi, I think you should mention that this extension basically would prohibit adding methods on primitive types later, which is probably more efficient and allows one to use the same methods on the primitive types in every php app you write. I fear that a lot of people will (have) to come up with their own string libraries, int libraries etc. which will have (subtle) differences. Guess you code for two projects, one using the autbox library X and one library Y. Would you always remember which methods you're allowed to call on an int, or the order of parameters, especially when there are many methods which have a similar name? Imho, the way to go here is implementing eg the array_* family of functions directly in php as methods for arrays, etc. Cornelius