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 UTC

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