"Rowan Collins" wrote in message news:cef783bb-8e1f-4a20-9cc6-1364a122b...@gmail.com...

On 31 May 2017 10:26:06 BST, Tony Marston <tonymars...@hotmail.com> wrote:
wrote in message
news:86dba466-a764-522b-6990-39fd7668a...@fleshgrinder.com...
I should point out that snake_case was the universal standard decades
before some people switched to CamelCase.

[citation needed]

My first job in computing was with a UNIVAC 1108 mainframe in the 1970s. This used a 6-bit character instead of an 8-bit byte, which meant that it could support upper case characters, but not lower case. Where a name was comprised of several words an underscore separator was used, as in "end_of_file".

Lisp, for instance, uses hyphens to separate words, and has don't since the 1950s.

That was only because some software could
not handle long names, but could handle both upper and lower case, so
an upper case character was used instead of an underscore.

[citation needed]

Try reading https://en.wikipedia.org/wiki/Naming_convention_(programming)#Length_of_identifiers

I'm sorry, but this smells of folklore and guesswork to me. Both underscores and mixed case are workarounds for the inability to include spaces in identifiers, and have their pros and cons, most of which these days come down to opinions on aesthetics.

Some studies have shown that that most people find it easier to read compound names which use the underscore separator. Look at the following:

https://en.wikipedia.org/wiki/Camel_case#Readability_studies
https://en.wikipedia.org/wiki/Snake_case  (first paragraph)

This is not guesswork on my part, it is a documented fact.

--
Tony Marston


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

Reply via email to