Asymmetry

Just an innocent question that may have been
asked before - but one I can't keep myself
from asking.

Why are the insertion methods asymmetric?

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

I know it is possible to insertAfter and
prependChild with a little more work with the
existing interfaces at a negligible performance
penalties but why put users through that
unnecessarily?

It happened to occur to me when I wrote
some code that needed to use the complementary
operations.

Thanks

-John

Received on Wednesday, 1 November 2000 10:19:04 UTC