[XML-SIG] Ugh! Why are DOM access methods spelled with a leading '_'?

Uche Ogbuji uogbuji@fourthought.com
Sun, 25 Jun 2000 18:37:59 -0600

I should note that I quite hope that leading-underscore-means-private is 
indeed not normative, and never will be so.  The leading underscore is the 
most readable way to escape symbol names that would clash with an applicable 
naming convention.  It's far from a conclusive argument (though Jim Fulton 
tried to make a similar argument to excoriate the Python/CORBA binding), but 
most languages, such as C++ allow exactly this approach as put to good use by 
the C++/CORBA binding.

The leading-underscore-is-private idea has the annoying effect that if I want 
to call a variable "class", I must instead use the silly "klass", rather than 
"_class", which is far more readable and self-explanatory.  And if I want to 
call variables "def", "type" and "else", what then?  "deph", "tipe" and "els"? 
 (I suppose one could use trailing underscore).

Most likely, Guido is already in his time machine writing "Thou shalt not use 
leading underscore except for private variables" on a stone tablet somewhere 
in the past to end the whole argument.  But people have been saying nasty 
things about the Python/CORBA binding which wouldn't be as nasty as the things 
I'd say about such a restriction in Python.

Uche Ogbuji                               Principal Consultant
uche.ogbuji@fourthought.com               +01 303 583 9900 x 101
Fourthought, Inc.                         http://Fourthought.com 
4735 East Walnut St, Ste. C, Boulder, CO 80301-2537, USA
Software-engineering, knowledge-management, XML, CORBA, Linux, Python