- From: Martin v. Loewis <martin@loewis.home.cs.tu-berlin.de>
- Date: Sun, 17 Sep 2000 16:18:50 -0400 (EDT)
- To: www-dom@w3.org
I just compiled the Level 2 DOM specification with a recent IDL
compiler, and noticed a number of problems.
1. Keywords are used as identifiers, namely:
supports readOnly valueType object
This did not get caught by earlier compilers for two reasons:
a) supports and valuetype were added only in CORBA 2.3
b) even though IDL was case insensitive all the time, compilers
often did not check whether an identifier was the same as a
keyword except for case.
If possible, I recommend to rename these things.
Otherwise, the escape mechanism introduced in CORBA 2.3 should be
used: Keywords can be used as if prefixed with "_" (i.e. _supports,
_readOnly, etc). The underscore only tells that this is meant as an
identifier; in the programming languages, the underscore is removed
(unless the name is a keywords in the programming language also).
2. range::Range (of range.idl) is ill-formed 2.3 IDL; a name must not
be re-used in its immediate content. The rationale is that some
languages (C++, Java) disallow using a name in the immediate scope
of a class with the same name;
interface Foo{
void Foo();
};
would not translate to C++, as Foo::Foo is the constructor, not a
method named Foo.
Regards,
Martin
Received on Monday, 18 September 2000 10:19:56 UTC