Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] prefixChild?

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: John Cowan <cowan AT mercury.ccil.org>
  • To: Elliotte Rusty Harold <elharo AT metalab.unc.edu>
  • Cc: xom-interest AT lists.ibiblio.org
  • Subject: Re: [XOM-interest] prefixChild?
  • Date: Mon, 5 May 2003 08:30:12 -0400

Elliotte Rusty Harold scripsit:

> I note that I have trouble remembering
> whether it's insertChild(0, node) or insertChild(node, 0). Is there
> any reason for preferring one order to the other? Would it be any
> more natural to put the index after the node rather than before? Or
> is this just a pick one question where I should stick with what we've
> got?

I prefer insertChild(node, 0), which I read as "insert child node at zero";
in Smalltalk notation, "insertChild: node at: 0". In general, the direct
object of the verb which names the method should be the first argument.

Fortunately, since the arguments have different types, the compiler will
catch misordered arguments.

--
You escaped them by the will-death John Cowan
and the Way of the Black Wheel. jcowan AT reutershealth.com
I could not. --Great-Souled Sam http://www.ccil.org/~cowan




Archive powered by MHonArc 2.6.24.

Top of Page