Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:61338 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 10959 invoked from network); 17 Jul 2012 10:05:34 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 Jul 2012 10:05:34 -0000 Authentication-Results: pb1.pair.com header.from=brandon.wamboldt@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=brandon.wamboldt@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.42 as permitted sender) X-PHP-List-Original-Sender: brandon.wamboldt@gmail.com X-Host-Fingerprint: 209.85.214.42 mail-bk0-f42.google.com Received: from [209.85.214.42] ([209.85.214.42:45378] helo=mail-bk0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id FB/52-28715-DE835005 for ; Tue, 17 Jul 2012 06:05:33 -0400 Received: by bkcjm19 with SMTP id jm19so142971bkc.29 for ; Tue, 17 Jul 2012 03:05:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=lJRLO7glXR5lpHa3T2MOd+y8INdPg1pgHHXbjMMDtGY=; b=ySgOjAA2LYUlbxJ2zTvOs7tRVkXq/gSBiVVbrBGEoj/XOlWbBQ20/uTZDvizI9xgYk 5o1jToeXajIG4QM7YyFQdNKHwbNtkOrLhcUPeU3GazKPSkN0hLXzIfk87TACbzGEdeLn SghYg3z2eUW/Bb6FRBIqNBfJ46WSBl6OqI831tkuDPhzT3A67cJfQfiZYZTC4UKEA776 SjaTt8OLyMacV/vo+M54x826dv+Fn1Kw2jm8yraWhgEzuMYhXj5UYwieNxzyNw2cL/m6 7XqYSFWXSdNhEHePBksaZtlmmLX655Os6aGIbXcXrCMMZsMA9SZw01bv0lNX4wTrNJcw Afpg== Received: by 10.205.130.17 with SMTP id hk17mr739276bkc.76.1342519530293; Tue, 17 Jul 2012 03:05:30 -0700 (PDT) MIME-Version: 1.0 Received: by 10.204.140.139 with HTTP; Tue, 17 Jul 2012 03:05:10 -0700 (PDT) In-Reply-To: <50052B5E.3030204@nunninger.info> References: <5003DDF4.5080709@b1-systems.de> <50052B5E.3030204@nunninger.info> Date: Tue, 17 Jul 2012 07:05:10 -0300 Message-ID: To: Thomas Nunninger Cc: Nicholas Curtis , internals@lists.php.net Content-Type: multipart/alternative; boundary=000e0cd1fd18b5089c04c503af70 Subject: Re: [PHP-DEV] 6.0 And Moving Forward From: brandon.wamboldt@gmail.com (Brandon Wamboldt) --000e0cd1fd18b5089c04c503af70 Content-Type: text/plain; charset=ISO-8859-1 > > you have to change existing code (if I understand your syntax > correctly) I think the idea here is to put functions likes floor and round in a legacy namespace of sorts, so they are not accessible in the global namespace. Then you have an .ini directive that imports the legacy namespace into the global namespace. Disable the .ini directive for 100% PHP6 mode, leave it in for legacy support. If it's enabled, you could mix round( $int ) and $int->round() in the same file. That's my understanding at least. On Tue, Jul 17, 2012 at 6:07 AM, Thomas Nunninger wrote: > 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 " " thing. And of course: You could still mix different styles in one file - > but not in one php block. And that's easier to handle by coding conventions > in the team.) > > Versioning could be a chance to evolve the language and not to mess with > existing code. BUT: I don't know if that's doable internally. And it's > probably a lot of work... > > Regards > Thomas > > > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > -- *Brandon Wamboldt* Programmer / Web Developer StackOverflow Careers Profile- GitHub Profile - LinkedIn - My Blog --000e0cd1fd18b5089c04c503af70--