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

Paul Prescod paul@prescod.net
Tue, 27 Jun 2000 05:21:19 -0700


tpassin@home.com wrote:
> 
> Jim Fulton continued the attributes thread -
> 
> I still don't see why anyone is still arguing about whether the DOM rec
> makes Python use attributes.  It doesn't.  

Nobody is arguing that. Some people *were* arguing that the DOM rec
mandates the use of methods (or, more precisely, that DOM ID + Python
IDL mapping = methods). But the DOM IDL is clearly not normative because
it doesn't even parse as IDL. So we can put that argument to bed. We
need to make the decision on technical and aesthetic merits.

Attributes:
	* arguably more Pythonic (=easier to use)
	* faster for non-computed attributes
	* slower for computed attributes
	* more like Javascript, VB and COM-like languages (C# :) )

Methods:
	* slower for non-computed attributes
	* faster for computed attributes
	* harder to implement
	* more like Java

There are no killer arguments here, just different weights applied to
the various features. I don't think that we are going to agree to break
code today. Maybe later we'll see that there are more DOM implementors
than clients and their ease of implementation will take precedence.

-- 
 Paul Prescod - Not encumbered by corporate consensus
When George Bush entered office, a Washington Post-ABC News poll found
that 62 percent of Americans "would be willing to give up a few of the
freedoms we have" for the war effort. They have gotten their wish.
	- "This is your bill of rights...on drugs", Harpers, Dec. 1999