Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:84619 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 29493 invoked from network); 12 Mar 2015 09:21:38 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 12 Mar 2015 09:21:38 -0000 Authentication-Results: pb1.pair.com smtp.mail=arvids.godjuks@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=arvids.godjuks@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.218.42 as permitted sender) X-PHP-List-Original-Sender: arvids.godjuks@gmail.com X-Host-Fingerprint: 209.85.218.42 mail-oi0-f42.google.com Received: from [209.85.218.42] ([209.85.218.42:46873] helo=mail-oi0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 80/2B-64353-1AA51055 for ; Thu, 12 Mar 2015 04:21:37 -0500 Received: by oiga141 with SMTP id a141so12060489oig.13 for ; Thu, 12 Mar 2015 02:21:33 -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=Q8kqSFU0kih5835t3MeOBuWsSvp4qrdDyM6VLuhp+FI=; b=iElQuQwhL57wXtkHXBSx+Gw2OfNFAarkQR4RQDGTj4RJbyM5aivR6eEpOhkmLq+76/ QObrquTmPBmBiU3rj2YiQaFmfBWiXntO3GdSQcdQef8ApVvIsxtdXbNGnHFV59sS9Bch yTclfrLCG5XIpdTx5G9g9oT+wNJqbVnrLi/s55y0dx8wYSZ1sNaX3TfTtNRqE2p+z/MZ 8fr+4ulqZH2d6GNdI013x9sj25lsNrTU3+oYQrCoXuXC6hYie3jJHsOmDjKsLZzGwvwh NZ21CKiq0fZu8uasTrc+iakx5IJL3q/9fNMZb3w4VR2GKXXYwMMpun18dZExtfpwMSh6 pWhQ== X-Received: by 10.202.195.68 with SMTP id t65mr31017780oif.105.1426152093579; Thu, 12 Mar 2015 02:21:33 -0700 (PDT) MIME-Version: 1.0 Received: by 10.60.14.39 with HTTP; Thu, 12 Mar 2015 02:21:13 -0700 (PDT) In-Reply-To: <5500F527.1030606@lsces.co.uk> References: <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> <54FF5E39.7000507@lsces.co.uk> <550035F0.10703@gmail.com> <5500F527.1030606@lsces.co.uk> Date: Thu, 12 Mar 2015 11:21:13 +0200 Message-ID: To: Lester Caine Cc: PHP internals Content-Type: multipart/alternative; boundary=001a11c17b98ef1cee051113e870 Subject: Re: [PHP-DEV] Consistent function names From: arvids.godjuks@gmail.com (Arvids Godjuks) --001a11c17b98ef1cee051113e870 Content-Type: text/plain; charset=UTF-8 2015-03-12 4:08 GMT+02:00 Lester Caine : > On 11/03/15 22:44, Yasuo Ohgaki wrote: > > Having namespace for internals would bring much flexibility for API > changes, both > > OO and procedural API. I may try my best to have consensus. > > > > I think you also like to have OO style API for basic > > variables(int/float/array) as I am. > > Unless we have good/proper procedural API names, it would be an obstacle > to > > have OO style API for basic variables. I wish you agree to do something > for it. > > Personally I just want to keep the current name set and so the sheer > volume of changes proposed is a big kick in the face to me. People are > talking about the need for an OO based interface, but there has been no > comment by anybody as to how that should be styled. Having switched > everything to camelCase as part of the E_STRICT reworking that is > already well established so while I can see why you want to complete a > complete switch to underscore padded names THAT is not consistent with > what everybody else is already using? > > There should not be two naming styles running in parallel and that is > all I am objecting to. If you get support for this RFC then both an > extended namespace name set and OO based objects should all follow the > same rules, and THAT is not what has been happening? > > I think it is equally valid to ask if the current naming guide IS still > appropriate or if a switch to camelCase for every name space is more > practical moving forward. In which case dropping the extra underscores > makes more sense than adding hundreds more! That a name can be written > all lower case, all upper case or any combination is more a matter of > choice, but as you say error messages adopt a standard that may not > match what is in the code anyway? > > -- > Lester Caine - G8HFL > Basically this. Yasuo asked me some time ago how do I see the new interface, and to be frank, I do not see a new procedural api interface at all. We have one now, and adding a new subset of it looks pointless. It has it's problems and legacy, you can't really fix it. Maybe some adjustments are in order to make it more consistent where it can be done. I really see only the OO API as a new additional interface. It's part started by the DateTime, the MySQLi classes and stuff. At this point all that stuff can be still namespaced, adjusted if needed and continued, just from the std library first. I, actually, use _ for function and variable naming and camelCase for object methods and properties. To be frank, I like it - it visually clearly separates the code styles and for the most part the PHP code is written that way (well, the MySQLi has ->num_rows and stuff - i'd change it to ->numRows and so forth). Arvids. --001a11c17b98ef1cee051113e870--