On 10/05/13 20:02, Jim Mooney wrote:

As regards camelCaps, all I see in the Py Lib is underlines, so I
guess that's more of a convention and I might as well stick to it,

Yep.

I think both camelCaps and underlines are often artifacts having to
use short names years ago.

Not so much short names but the fact that white space wasn't allowed and you needed a way to separate words. When space was short - often only 6 significant characters (and in at least one case I've seen, only 4) - it was common to miss out vowels and other such tricks. Although on bigger projects a name index was maintained(*) and all variables had unique numeric IDs prefixing the meaningful name (although only 4
or 6 chars were meaningful often you could have up to 32 or
64 chars in total...). And of course early BASIC just gave you single character variables although you had separate lists for numbers and strings (A and A$ for example).

And of course lisp uses hyphens for its names like: make-list

(*) And there would be a project name meister to whom you had
to apply for a set of numeric prefixes to use on your variables!
If you needed to create a new variable it could take a couple
of days before you could actually use it in your code!
Ah, the joys of big projects! :-)

caps for a program name are confusing, anyway. I never figured why
Msoft did that.

Because DOS came from CP/M and CP/M did that.
And CP/M was influenced by the early Dartmouth mainframes which used upper-case only... And on an 8 bit computing platform limiting the number of different names possible was a good thing!

Pascal is still case agnostic and in that community its often seen
as a benefit since it avoids a whole class of "error" - when you type
the case of a word wrongly...

Even modern IBM mainframes are still case insensitive - or more specifically they convert it all to upper case. One of the reasons
I dislike COBOL programming!

Since this is a beginner list, I think bringing up Python Preferred
Style is reasonably on topic.

For sure, it crops up regularly.

--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/

_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to