Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:61337 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 6975 invoked from network); 17 Jul 2012 09:07:56 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 Jul 2012 09:07:56 -0000 Authentication-Results: pb1.pair.com smtp.mail=thomas@nunninger.info; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=thomas@nunninger.info; sender-id=unknown Received-SPF: error (pb1.pair.com: domain nunninger.info from 87.106.55.207 cause and error) X-PHP-List-Original-Sender: thomas@nunninger.info X-Host-Fingerprint: 87.106.55.207 mail.nunninger.info Linux 2.6 Received: from [87.106.55.207] ([87.106.55.207:57687] helo=mail.nunninger.info) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 42/C1-28715-B6B25005 for ; Tue, 17 Jul 2012 05:07:56 -0400 Received: from [89.244.129.131] (helo=[192.168.178.30]) by mail.nunninger.info with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1Sr3kt-0006hC-F2; Tue, 17 Jul 2012 09:07:51 +0000 Message-ID: <50052B5E.3030204@nunninger.info> Date: Tue, 17 Jul 2012 11:07:42 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120615 Thunderbird/13.0.1 MIME-Version: 1.0 To: Nicholas Curtis CC: internals@lists.php.net References: <5003DDF4.5080709@b1-systems.de> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -1.4 (-) X-Spam-Several-Recipients: Yes Subject: Re: [PHP-DEV] 6.0 And Moving Forward From: thomas@nunninger.info (Thomas Nunninger) Hi, On 07/17/2012 05:40 AM, Nicholas Curtis wrote: > Great Idea, would love to see current standard library in a legacy > namespace and a new standard library implemented as methods of > primitive types. The idea to separate old and new behaviour has some charm. > $string = "Hello, World"; > echo $strong->toUpper(); // HELLO, WORLD > > $int = 3; > echo $int->round(2); // 3.0 > > While still preserving $legacy.strTopUpper($string) and $legacy.round($int) I wouldn't do that because it implies two things: - you have to change existing code (if I understand your syntax correctly) - you could mix old and new style in one file Somebody proposed (in some other thread some weeks ago) to introduce some code versioning. IIRC he proposed the "