- You didn't say: Larry's preference, you said "generally"
- Larry does not explicitly address that in perlstyle. (note, LW's
style notes are only the first portion of that doc, the latter portion
is other's (largely Tom Christiansen).
- One part of that document *does* explicitly address using case to
indicate scope, and it suggests all caps for *constants*, and mixed
case for package globals (the case at hand).
- As many people in the community use MixedCase as use underscores to
separate "words" in identifiers.
Your way is in no way the general way, or even the recommended perlstyle
way.
| [reply] |
This is from perlstyle:
While short identifiers like $gotit are probably ok, use underscores to separate words. It is generally easier to read $var_names_like_this than $VarNamesLikeThis, especially for non-native speakers of English. It's also a simple rule that works consistently with VAR_NAMES_LIKE_THIS.
hardburn's advice is solid, helpful, and appreciated.
Your advice is ... what is the point of your
advice? That even though hardburn's advice was good,
it is opinionated? So what? It's ALL opinion! At least i know who hardburn is. Who are you? Generally speaking,
of course.
| [reply] |
And from just below your quote in perlstyle:
o You may find it helpful to use letter case to indicate
the scope or nature of a variable. For example:
$ALL_CAPS_HERE constants only (beware clashes with perl va
+rs!)
$Some_Caps_Here package-wide global/static
$no_caps_here function scope my() or local() variables
My point is simply that what hardburn said was the general way is
not the general way.
| [reply] [d/l] |