Hi Lester, On Tue, Mar 10, 2015 at 6:27 PM, Lester Caine <les...@lsces.co.uk> 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 yohg...@ohgaki.net