Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:84519 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 47063 invoked from network); 10 Mar 2015 20:44:59 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 10 Mar 2015 20:44:59 -0000 Authentication-Results: pb1.pair.com smtp.mail=yohgaki@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=yohgaki@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.218.41 as permitted sender) X-PHP-List-Original-Sender: yohgaki@gmail.com X-Host-Fingerprint: 209.85.218.41 mail-oi0-f41.google.com Received: from [209.85.218.41] ([209.85.218.41:46978] helo=mail-oi0-f41.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 0E/AB-08808-AC75FF45 for ; Tue, 10 Mar 2015 15:44:58 -0500 Received: by oiga141 with SMTP id a141so3970763oig.13 for ; Tue, 10 Mar 2015 13:44:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=899eG+64jdMMywcI4XCUp5wdOIuOTFJXTSMteIrV3NU=; b=C6Ijs4HgK/I0Xq9PEZ1Aa/yzsqByZRoqwPVKXj38Z0iFaixYUNdbDDioniiZ7vRmA6 A/J2QeiqPqVLIuIO/TJw3DXB7H3Jz1Qnj6R0zeIUg3WJZ/ySqDxHkNbLrwG4cD7pgH+X +LJNa0BCDE6W/537fTfiXKivqnlmw9noDq2MRShSnCL1C9UofqSqJ/3Jc0ZiTlkVDm6o tmFoKJ1lO685veRwktXa02CmV0lDhctC3LGhmzF20qtn++m8raDwTQ47CsTAMUW1HkpQ 8boFMW5UbFH2alAAs7th1KLjvN353u4JXd16RQMLcQee+o2595tgotjBok32OhjM0oYP vaOA== X-Received: by 10.182.66.1 with SMTP id b1mr17180183obt.14.1426020295005; Tue, 10 Mar 2015 13:44:55 -0700 (PDT) MIME-Version: 1.0 Sender: yohgaki@gmail.com Received: by 10.202.58.2 with HTTP; Tue, 10 Mar 2015 13:44:14 -0700 (PDT) In-Reply-To: <54FEB910.5000608@lsces.co.uk> References: <5D8591E2-5AE6-4B4C-AAE0-3D15523410AC@gmail.com> <54F83C4D.1020206@gmail.com> <54F8BF67.6080600@gmail.com> <848D3C19-DE29-4E5F-9B23-D87D3F4A9365@gmail.com> <54FB45D6.3040803@gmail.com> <54FCD063.4040300@gmail.com> <54FEB910.5000608@lsces.co.uk> Date: Wed, 11 Mar 2015 05:44:14 +0900 X-Google-Sender-Auth: QjsmT_FvqAH3UsusO6LUpimBFbc Message-ID: To: Lester Caine Cc: "internals@lists.php.net" Content-Type: multipart/alternative; boundary=e89a8fb1eabe205cc60510f539ce Subject: Re: [PHP-DEV] Consistent function names From: yohgaki@ohgaki.net (Yasuo Ohgaki) --e89a8fb1eabe205cc60510f539ce Content-Type: text/plain; charset=UTF-8 Hi Lester, On Tue, Mar 10, 2015 at 6:27 PM, Lester Caine wrote: > On 10/03/15 01:59, Yasuo Ohgaki wrote: > > The same argument applies to fresh new OO APIs. It's just a matter of > > targeted PHP version to be supported. There are many things to be > > considered to decide targeted PHP version other than this RFC. We have > many > > new features/behaviors in newer PHP versions. > > I still have a major problem with the whole basis of your re-naming ... > adding the underscore at all. It was this introduction which was totally > wrong in the first place and I would rather rename the incorrectly > renamed functions if only to make them consistent with what is used in > the OO 'standard'. > > $main->phpVersion() > or > phpversion() > > Is consistent if one maintains the case insensitive rule. > > Adding str_ in front of every string function where a lot are IEEE > protected is just adding confusion. Where these map to an OO API in my book > > strcmp() > $str->cmp() > > makes sense? > Adding an extra $str_cmp is simply not necessary. > > Simply dropping the poorly formulated 'add underscore' rule which only > currently exists on the procedural interface and tidying up the mistake > caused by that produces a MUCH shorter list of changes and allows much > better consistency with even the existing OO interface elements? > > I look at the 'tidy' gd interface and simply think 'what the ****' > > Yes there are some inconsistent names, but in general > imagecolorallocate > and > $image->colorAllocate > > is more in keeping with the other graphics libraries. > > YES there is room to create a more consistent procedural interface, but > my original question still applies "consistent with what rules?" It's possible choice. I agree that names without "_" looks more consistent. Personally, I don't care much about having "_" or not for procedural API. My only concern is naming consistency. Names without "_" changes basic coding rule. Problem is how to make a choice and how to define exceptions. e.g. nl_langinfo() I wonder how many of us prefer names without "_". Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net --e89a8fb1eabe205cc60510f539ce--