[Tutor] Re: Philosphy on method naming in modules?

Jeff Shannon jeff at ccvcorp.com
Thu Sep 4 19:31:11 EDT 2003


Andrei wrote:
> ... On a sidenote, I for one also 
> prefer "displayUnihan" (verb first and starting with a lowercase), but 
> this is very much a matter of taste I suppose. 

Definitely a matter of taste -- I loathe mixed-case names that start 
with lower case.  ;)  FirstLetterCaps is good, underscore_for_spaces 
is okay, but camelCase bugs the snot out of me -- it's the inverse of 
normal sentence capitalization and has no parallel in normal language 
usage.  I suspect this is a religious issue, though (no amount of 
logic will convince anyone on either side).

> I'd also avoid UHDisplay 
> because it's hard to type and remember - doubly so since Python is case 
> sensitive.

I agree with this.  In wxPython/wxWindows, names are all prepended 
with 'wx' (e.g. wxFrame, wxDialog, wxEvent), but that was originally 
dictated by the C++ library that it wraps (which predates C++ 
namespaces).  Even there, though, it's in the process of migrating 
everything to a wx namespace and referring to them as wx.Frame, 
wx.Dialog, etc.

Jeff Shannon
Technician/Programmer
Credit International




More information about the Tutor mailing list