On 5 May 2010 19:01, Steven Van Poeck <svanpo...@gmail.com> wrote:
> Right. That's what I meant by inconsistent code. The call
> $logs->getSQLLogger()->logSql("...") would function I presume.
> The reason your example code does not is because it is inconsistent. You're
> calling $logs->getSqlLogger() instead of $logs->getSQLLogger()

Agreed, but not everyone's going to spot that first time, particularly
the sorts of newer programmers we get quite a lot of writing PHP.
Also, the error message you get out the other end is suboptimal, to
say the least.

I've been holding out on stating my reasoning much beyond my initial
post and vote to try avoiding influencing anyone, but I'm opinionated,
so here goes. :)

Here's an example of my problem with enforcing case-sensitivity in
general that builds on something Johannes said yesterday on IRC: how
many people use different cases for the gd functions? Taking, say,
imagestring as a simple example and having a quick look at Google Code
Search, the variants people are using there are:

ImageString: about 3000 results [0]
imagestring: about 4000 results [1]
imageString: 453 results [2]
IMAGESTRING: 1 result [3]

There are probably other variations in use too, and that's one of the
more simply named functions in gd.

The above example pretty much sums up why I went for option 1 instead
of 2 in my vote: it's still a BC break, but I honestly thing it's
going to be a much more minor break (remember, it only affects people
in certain Western European locales such as French, Spanish and German
who are _also_ using single-byte encodings — most Linux distros I know
of are shipping with UTF-8 as a default, so they're already
effectively case-sensitive for non-ASCII characters) than changing the
entire language and probably causing issues in a wide variety of
applications.

If I was designing the language anew, sure, I'd go for
case-sensitivity the whole way, but as things stand, I'm pretty
dubious it would work out.

Adam

[0] 
http://www.google.com.au/codesearch?as_q=%22ImageString%22&btnG=Search+Code&hl=en&as_lang=php&as_license_restrict=i&as_license=&as_package=&as_filename=&as_case=y
[1] 
http://www.google.com.au/codesearch?as_q=imagestring&btnG=Search+Code&hl=en&as_lang=php&as_license_restrict=i&as_license=&as_package=&as_filename=&as_case=y
[2] 
http://www.google.com.au/codesearch?as_q=imageString&btnG=Search+Code&hl=en&as_lang=php&as_license_restrict=i&as_license=&as_package=&as_filename=&as_case=y
[3] 
http://www.google.com.au/codesearch?as_q=IMAGESTRING&btnG=Search+Code&hl=en&as_lang=php&as_license_restrict=i&as_license=&as_package=&as_filename=&as_case=y

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to