Re: 3 comments for the 0720 DOM spec...

re point 1: Not all languages support enumerations per se. (Java's one
obvious example that doesn't, and the C implementation is not much more
than a self-calculating set of #defines.) I agree that in languages which
do have this feature, and especially in those which perform typechecking on
enums, providing the "named constants" in that form would be appropriate.
But I'm not sure how one formally states language-specific alternatives in
this sort of spec.

(This brings up an interesting question. If a user subclasses the DOM
objects, are they allowed to introduce other kinds of nodes? If so, the
enum approach would require that the enum also be subclassable to add
appropriate nodetypes. I'm not sure which languages that support enums also
support subclassing them. Of course if the node types are _not_ considered
extensible, that isn't an issue.)

______________________________________
Joe Kesselman  / IBM Research
Unless stated otherwise, all opinions are solely those of the author.

Received on Friday, 14 August 1998 09:29:18 UTC