CamelCase versus wide_names (Prothon)
AndrewL
langspam at yahoo.com
Fri Apr 16 01:58:21 EDT 2004
I most prefer Lisp style, which uses dashes, as in
(with-open-file (do-foo-bar))
but that's not an option. Note that I don't yet find Lisp more readable
than Python. It's just that I like the dashes.
Next would be wide_names. I think it looks less elegant than camel case, but
it's more readable for me. It's what I use in my Python (and the Perl they
force me to write at work). And I don't know why I find Lisp's dash less
jarring than underscores. It just flows better for me.
A professor in a programming class told us of a study that found
wide names are easier for non-native speakers to read. I can see that.
Compare trying to make sense of these two:
genusIrritabileVatumDel versus genus_irritabile_vatum_del, especially
if you're getting pages of it.
The ease of typing is much less of an issue for me than readability.
I have a macro in jEdit that inserts an underscore, and it's mapped
to alt-spacebar. Plus I use auto-complete. So go for (what I personally
consider) readability.
Andrew Langman
More information about the Python-list
mailing list