W3C home > Mailing lists > Public > www-dom@w3.org > January to March 2001

Re: Type-safe iteration over the DOM in DOM 2 & 3?

From: Americo Albuquerque <chainsword@altavista.com>
Date: 26 Mar 2001 06:07:48 -0800
Message-ID: <20010326140748.2676.cpmta@c012.sfo.cp.net>
To: www-dom@w3.org
On Thu, 22 March 2001, "Joseph Kesselman" wrote:

> Given our inabilty to rely upon methods being overloaded by argument
> signature,  we couldn't define the Visitor API as having both the methods
>      execute(Element e)
> and
>      execute(Attr t)

Couldn't it be done with something like:

function execute(void tmp) [
 switch(typeof(tmp)) {
  case "Attr":
  'Execute Attr code
  break;
  case "Element":
  'Execute Element vode:
  break;
 }
}
?

it simply see what kind of parameter it got and act accordinaly


Find the best deals on the web at AltaVista Shopping!
http://www.shopping.altavista.com
Received on Monday, 26 March 2001 09:07:50 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:13:48 GMT