Re: empty arg in p:exec

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
them.

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,
                                          norm

-- 
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