RE: [xsl] One-based indexes in XPath

Subject: RE: [xsl] One-based indexes in XPath
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Wed, 21 May 2008 18:02:10 -0400
At 05:13 AM 5/21/2008, Owen wrote:
Dijkstra wrote a note "Why numbering should start at zero":

This is great. Especially the confession that this most "natural" rational argument was spurred in reaction to to an emotional outburst by a person who had supposed that a reasonable, considered decision to number from zero, then applied out of habit (probably in a context outside the proper scope of the numbering system, although we aren't told this), to be "pedantry", and therefore, by implication, to be motivated by something other than reason.

What the argument doesn't consider is that the habit of counting from zero might have been both reasonable and pedantic, since motivations need not be exclusive of one another (much as this might bother reasonable people). The argument is made that zero-based numbering is convenient and reasonable, but it does not demonstrate that the charge of pedantry was unjust.

I agree that XSLT made the right decision, while I admit that it's sometimes awkward.

And I suspect that Justin agrees that if XSLT's designers had designed it so as to avoid any offense to Javascript programmers (or to callow youth of any persuasion), it would probably be even more awkward than it is.


====================================================================== Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx Mulberry Technologies, Inc. 17 West Jefferson Street Direct Phone: 301/315-9635 Suite 207 Phone: 301/315-9631 Rockville, MD 20850 Fax: 301/315-8285 ---------------------------------------------------------------------- Mulberry Technologies: A Consultancy Specializing in SGML and XML ======================================================================

Current Thread