Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:71648 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 16883 invoked from network); 27 Jan 2014 18:13:38 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 Jan 2014 18:13:38 -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.175 as permitted sender) X-PHP-List-Original-Sender: rowan.collins@gmail.com X-Host-Fingerprint: 74.125.82.175 mail-we0-f175.google.com Received: from [74.125.82.175] ([74.125.82.175:47161] helo=mail-we0-f175.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id EA/F2-01140-0D1A6E25 for ; Mon, 27 Jan 2014 13:13:37 -0500 Received: by mail-we0-f175.google.com with SMTP id p61so5615941wes.20 for ; Mon, 27 Jan 2014 10:13:33 -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; bh=6xpopdItiWjE+BK3Z6QRbLnhuATYJqQ6aB76pu0RtNc=; b=Opi17vmhrU8X/bxXkKBTpIm8h9PWQ5Ads/9pxIxO7gMDHKE3OX8e73Jjor1g2wvQDW +fdBr6uNaaPMgKNfWsmo1dd9LdlJG9njp8HMHbiYvx8Vi+0/Ot2+6QZwd6hBHndk7+AA CmgVOqjqNQLrcup+7Mf9KYQV5kszWONpoQvgW4rInHpWJZVpUSdVaqyzrAKdExbCokMe qkxhxd6LEG53850MdGJtjPttfYa8D6RrKjsmFycIkgaFol7/95tCUXNHzp5ERb39Vd45 0rZgBZeYcYzwtPyZRcMYSU6upiz3fTT/6y262I3GZy7/zzBayEiSU+Yh6iQeIRzrI6K3 qzHA== X-Received: by 10.194.176.163 with SMTP id cj3mr21231247wjc.8.1390846413118; Mon, 27 Jan 2014 10:13:33 -0800 (PST) Received: from [192.168.0.141] ([62.189.198.114]) by mx.google.com with ESMTPSA id ju6sm27079461wjc.1.2014.01.27.10.13.31 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 27 Jan 2014 10:13:32 -0800 (PST) Message-ID: <52E6A1CA.60808@gmail.com> Date: Mon, 27 Jan 2014 18:13:30 +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: <7E.A3.39789.25841E25@pb1.pair.com> <12.A5.39789.B7851E25@pb1.pair.com> <52E16E01.7070401@gmail.com> <52E1BDB0.6050406@garfieldtech.com> <52E40F7E.3050001@gmail.com> <52E5563A.4070701@gmail.com> In-Reply-To: Content-Type: multipart/alternative; boundary="------------000204020303080806090808" Subject: Re: [PHP-DEV] Re: [PHP6] Function name consistency From: rowan.collins@gmail.com (Rowan Collins) --------------000204020303080806090808 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Yasuo Ohgaki wrote (on 27/01/2014): > I understand this argument. Since we have short release cycle and > rather short life for a release, this is short term disadvantage. They > may keep using aliases functions also. At the moment, the short release lifetime is rather more theoretical than proven. PHP 5.3 was released nearly 5 years ago, but some surveys put 5.2 at a 30% share, e.g. http://w3techs.com/technologies/details/pl-php/5/all What's more, the more radically each version changes, the longer it will take to be adopted, and the more pressure there will be to support older versions in parallel. (I'm talking here about 3rd parties supporting their code, not PHP.net supporting the implementation.) > > A long overlap with multiple names for everything has its costs, > and a short overlap with lots of breaking changes also has its cost. > > > Keeping inconsistent names have its cost also. A good point. > IMHO, aliases would not affect readability. Users would understand what > > word_wrap() and wordwrap() > htmlspecialchar and html_special_chars() > and so on > > means. But they might wonder if there was a difference between them, particularly if the aliases are more distinct (e.g. count() vs sizeof()). > I agree that automatic aliasing would not be good. > String and array function names needs more discussion. > GD function names may be aliased automatically, for example. > > We should discuses if we are going to add standard name aliases > to module functions or not, perhaps? Yes, I think per-module / extension is the way to go - as with the pg_* functions you mentioned earlier. It can then be proposed that a certain module be converted to OO (as happened with DateTime), another tidied up to have a consistent naming structure, and another left alone until more "interesting" changes are being made to it. Regards, -- Rowan Collins [IMSoP] --------------000204020303080806090808--