autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: comma separated lists


From: Peter Eisentraut
Subject: Re: comma separated lists
Date: Wed, 19 Feb 2003 00:02:01 +0100 (CET)

Bruno Haible writes:

> Peter Eisentraut wrote:
> > The difference between space-separated lists and comma-separated lists is
> > approximately like writing in C func("arg1 arg2 arg3") rather than
> > func(arg1, arg2, arg3).  It is not "proper" for the language being used.
> > It is a historical mistake that is being phased out.
>
> This argument is bogus in two ways:
>
>   1) autoconf is not C. autoconf's input is processed through *m4*, and
>      results in *sh* output. Some autoconf macros contain C code, just like
>      some other macros contain Fortran snippets, but the best proof that C
>      is not central in autoconf is that the  [ ]  tokens stand for something
>      different in autoconf input than in C.

It was just an analogy.  I could have constructed an example in some other
programming language.  The fact is that the space-separated lists are not
"native" to the m4 language.

>   2) autoconf knows about two kinds of lists (see *Node: Input processing):
>      - Argument lists of m4 functions, where each argument has a different
>        meaning (because most m4 functions are not variadic).
>      - Token lists, where each token has the same meaning.

I don't find this node in the documentation of the versions I have around.
Even if it's true, it's probably just an attempt to describe the status
quo and does not imply that the status quo is an ideal system.

> Comma as separators always make the empty list a special case (because it has
> 0 commas, like the list with 1 element).

I don't see how just changing the separator character makes this problem
go away.  The inability to distinguish between "nothing" and "empty" is
deeply wired into m4.

> This style leads to the 800 KB configure files that we have now and that bloat
> every GNU distribution.

We are all aware of this problem, and if you can think of changes that
would make configure files shorter while not sacrificing robustness
elsewhere, we would surely like to hear about it.  Then again, others
think that disk space is cheap and configure files compress well, so the
problem is not as important as others that the Autoconf developers have to
deal with.

-- 
Peter Eisentraut   address@hidden





reply via email to

[Prev in Thread] Current Thread [Next in Thread]