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

Re: Asymmetry

From: Joseph Kesselman/Watson/IBM <keshlam@us.ibm.com>
Date: Wed, 1 Nov 2000 11:03:12 -0500
To: <www-dom@w3.org>
Message-ID: <OF3925491E.80C6FE7A-ON8525698A.00569820@pok.ibm.com>

>There is an appendChild, but no prependChild.
>There is an insertBefore, but no insertAfter.

Generally, we haven't put in trivial convenience functions (with the
exception of  some stuff that went in for "DOM Level 0" compatability);
there has to be a strong practical reason for adding them. Typically, that
means the promise of substantial performance improvement in a critical
usecase across a reasonably wide range of DOM implementations.

Since insertAfter is easily expressed as insertBefore(nextSibling()), and
prependChild as insertBefore(firstChild()), my current take is that these
fall in the trivial convenience category. (There _may_ be supporting
arguments here regarding optimizing in proxy DOMs, but I'm skeptical.)

Software engineering, not computer science...

______________________________________
Joe Kesselman  / IBM Research
Received on Wednesday, 1 November 2000 11:04:18 GMT

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