Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:70976 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 91978 invoked from network); 3 Jan 2014 02:15:06 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 Jan 2014 02:15:06 -0000 Authentication-Results: pb1.pair.com header.from=rowan.collins@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=rowan.collins@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.174 as permitted sender) X-PHP-List-Original-Sender: rowan.collins@gmail.com X-Host-Fingerprint: 74.125.82.174 mail-we0-f174.google.com Received: from [74.125.82.174] ([74.125.82.174:40393] helo=mail-we0-f174.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A1/00-26315-82D16C25 for ; Thu, 02 Jan 2014 21:15:04 -0500 Received: by mail-we0-f174.google.com with SMTP id q58so12849117wes.5 for ; Thu, 02 Jan 2014 18:15:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=4JVpD6RW+qdk6oQCV9NmnrBVR90aQJf3gyYmGfzNI2o=; b=YfUE8rbknIGg9GFC2YHJHToKRoiT/OPfR3nEDZCaCU5gl5ESJEzKdKpy8HqTnLyJId NkAkirXKLCnO4LNwNnHrwaLs87VvS0qZStv0BZ+Kzf3ytPsh8M/4MImRm/nivEhhNjpX RCqSC/WJnkWrhB4kFmpWX7htf6XV0JKezd+YyQ6SayI/Ip0A9ws521Z1E/KW/xFCUc1D Eg7AoSY1MVxngofOOVGPSKiw8IlR5ryWjvnBc4erliyyyh86ZQJtqMPwxOT+U+PrOsCo jUtBUHjk+hgZFbpY6tsPgO66UCHabi+gWpytmXZScOac6HQ9hCkCTI9H6GQjXb/BlHwb 0wug== X-Received: by 10.180.79.38 with SMTP id g6mr35091wix.60.1388715301846; Thu, 02 Jan 2014 18:15:01 -0800 (PST) Received: from [192.168.0.2] (cpc19-brig17-2-0-cust25.3-3.cable.virginm.net. [81.101.201.26]) by mx.google.com with ESMTPSA id pl7sm34307473wjc.16.2014.01.02.18.15.00 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 02 Jan 2014 18:15:00 -0800 (PST) Message-ID: <52C61D21.50808@gmail.com> Date: Fri, 03 Jan 2014 02:14:57 +0000 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: internals@lists.php.net References: <52BE8F35.9090104@b1-systems.de> <52C4A415.3040101@gmail.com> <52C4ADC8.1090009@lerdorf.com> <52C510CF.3030604@garfieldtech.com> <0bae3e8fb5acff88a1aba0bea6bd264d@yamiko.org> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [PHP6] Function name consistency From: rowan.collins@gmail.com (Rowan Collins) On 02/01/2014 20:00, Florin Patan wrote: > I suppose it wouldn't be a problem with having a tool that can > generate an AST out of a .php file and dump it back to a newer syntax > (as long as only the function / method / classes name and parameter > order is changing). Don't forget that there are various ways to do what could loosely be described as "reflection" or "meta-programming" in PHP - e.g. given call_user_func_array($func, $args) we may need to correct the name stored in the string $func, or the order of items in the array $args. These are very hard to even detect with an automated tool, let alone fix - indeed, I doubt it is even theoretically possible in many cases. That leaves you with either code that needs painstaking manual upgrades, or a runtime compatibility mode. Both of these come with a cost to the community at large - many people want to distribute (or internally manage) code that is both backwards and forwards compatible, i.e. runs on as many past and future versions of the platform as possible. That's impossible to do with a hard compatibility break, and tricky if the compatibility breaks are subtle (such as new function names/aliases) as you have to keep testing and removing the new names until you no longer need to support the old versions. A more fundamental restructuring (e.g. an OO implementation of "basic" operations) could more happily sit alongside the existing functionality, with code very obviously using either one style or the other, and compatibility easy to maintain over the longer term. Regards, -- Rowan Collins [IMSoP]