W3C home > Mailing lists > Public > xproc-dev@w3.org > March 2010

Re: empty arg in p:exec

From: Norman Walsh <ndw@nwalsh.com>
Date: Mon, 22 Mar 2010 08:40:41 -0400
To: XProc Dev <xproc-dev@w3.org>
Message-ID: <m24ok8msvq.fsf@nwalsh.com>
Mike Sokolov <sokolov@ifactory.com> writes:
> Wow - this is reminiscent of Make, which distinguishes between TAB and 
> spaces - completely invisible to the programmer, but of critical 
> importance for getting your Makefile to work properly.  It's not clear 
> to me that there is any sort of valid use case for generating empty 
> arguments by splitting up multiple spaces, is there?  Maybe it was 
> spec'd that way to make it easier for implementers?

No. I can't immediately put my hands on the discussion, but it was a
compromise deamed less painful than the alternatives.

Initially we did the obvious thing, delimited arguments by one or more
spaces. Then we realized that we needed to handle the case where one
of the arguments could include a space. That meant introducing some
sort of quoting mechanism. That in turn meant that the args shortcut
option would have *at least* three quoting mechanisms: single and
double quotes per XML plus whatever we added. Then there's the
question of how do you quote the quote characters if you need a
literal quote character? And what if you need both a space and a
literal quote character?

It all just became too complicated. We also felt, rightly or wrongly,
that introducing multiple options: arg1=value1, arg2=value2, etc. was
too much of a kludge.

Inventing some totally new micro-syntax *just for this step* was also
too much of a kludge.

So in the end we decided that you'd be able to specify the delimter
character (so you could use "," if you needed spaces and quotes but
not commas, for example, or something from the Unicode private use
area if push came to shove).

The obvious default delimiter is the space.

And the knock-on consequence of all these decisions is that each
individual space delimits an argument, even if there's nothing between

Perhaps we should have said that you couldn't do that, that multiple,
adjacent delimiters counted as only a single delimiter. But we didn't.

                                        Be seeing you,

Norman Walsh <ndw@nwalsh.com> | At least two-thirds of our miseries
http://nwalsh.com/            | spring from human stupidity, human
                              | malice and those great motivators and
                              | justifiers of malice and stupidity:
                              | idealism, dogmatism and proselytizing
                              | zeal on behalf of religous or political
                              | ideas.--Aldous Huxley

Received on Monday, 22 March 2010 12:41:15 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:03:06 UTC