W3C home > Mailing lists > Public > www-dom@w3.org > October to December 1999

Re: DOM L2 comments, various

From: Arnaud Le Hors <lehors@w3.org>
Date: Tue, 05 Oct 1999 18:09:38 +0200
Message-ID: <37FA22C2.4E88DD9F@w3.org>
To: www-dom@w3.org
John Cowan wrote:
> Au contraire.  I believe that using instanceof for type discrimination
> (as in, if (x instanceof Element) do_this else if (x instanceof Attr) do_that)
> is the worst kind of bogus OOP.  My implementation makes zero
> guarantees about underlying classes, how many or with what crossovers.

Well, I disagree, but it's ok.

> BTW, I don't see how you can implement all HTML*Element interfaces with
> one class in Java, since some of the instance methods have incompatible
> return types, and Java doesn't allow overloading on the return type.
> I needed IIRC six classes.

Same here, that's why I said "_Basically_ all the HTML*Element
interfaces were implemented on the same class." ;-)
Received on Tuesday, 5 October 1999 12:09:42 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 20 October 2015 10:46:06 UTC