[XML-SIG] 4DOM future

uche.ogbuji@fourthought.com uche.ogbuji@fourthought.com
Tue, 02 Nov 1999 12:28:13 -0700


Uche:
>> > Any comment about the "right" way, Python as well as DOM-wise?

Ken MacLeod <ken@bitsko.slc.ut.us>:
> My take on ``language bindings'' means to use conventions of the
> target language in defining in the binding API[*].  In the case of
> node.get_parent(), if that means using underscore instead of mixed
> case, because it's more common in Python, I agree with that.
> 
> More specifically, in the case of node.parent, there's already
> precedence for that in the DOM spec itself, the ECMA Script binding:
> 
>   <http://www.w3.org/TR/REC-DOM-Level-1/ecma-script-language-binding.html>
> 
> [* others disagree, preferring to use a strict transliteration of the
> Java binding because it's there in the spec and widely implemented in
> Java.]

Hmm.  I'm a bit unclear as to which way you're leaning: node.get_parent() or 
node.parent?  I see clearly that you think either is preferable to mixed-case 
(getParent()), and I agree with you in this particular domain, but I'm also 
interested in your (and others') opinions as to

*  Whether the greater pythonic feel of get_parent() or parent is worth the 
disruption to current users of 4DOM.
*  Whether get_parent or parent is superior: there is the Pydom precedent for 
get_parent() and the ECMAScript precedence for parent.
*  Whether the __getattr__ & __setattr__ overhead of parent would be worth it 
for a pure attribute idiom that after all seems to be the intent of the DOM 
rec.

-- 
Uche Ogbuji
FourThought LLC, IT Consultants
uche.ogbuji@fourthought.com	(970)481-0805
Software engineering, project management, Intranets and Extranets
http://FourThought.com		http://OpenTechnology.org