bug-gnulib
[Top][All Lists]
Advanced

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

Re: more m4 underquotations


From: Eric Blake
Subject: Re: more m4 underquotations
Date: Wed, 14 Feb 2007 15:06:09 +0000

> > The complexity stems from both the m4 language choice and
> > the brevity of the chosen quote markers.  The language issue
> > is that macros inherit the quote markers from their invocation
> > environment.  Nothing you can do about that.  (Too late to
> > choose another language without starting over.)
> 
> Yes. And all the ASCII pairs (), {}, [], <> are already used in the shell
> language, which is what autoconf macros expand into.

I would not be opposed to changing autoconf's quote string to
be a multi-character representation (such as [[single-quoted]]
and [[[[double-quoted]]]]), but doing so would invalidate ALL
existing autoconf macros, and necessitate bumping the autoconf
version number to document the incompatibility.  If that course
is taken, then we can also do things such as mandating
consistent m4sugar usage, but I don't think I am up to the
task of such a major rewrite.

> 
> > A better choice on the quote phrase is a possibility, but it
> > would be a pita to implement.  Still, it would be useful to
> > bite the bullet and do it.  Two character sequences for open
> > and close would massively improve the ambiguity, and likely
> > remove much of the need for those quadrigraphs.
> 
> Yes. Now that Unicode capable text editors are everywhere (including Emacs 
> 22),
> one can consider to go beyond ASCII. This means, choose non-ASCII Unicode
> characters as opening and closing quote:
> 
>   changequote(«,»)

Absolutely not.  Non-ASCII file encodings are still not reliably
transferred over email patches, and although there are editors
that handle UTF-8 nicely, there is too much risk that a user
will use those characters in his local encoding, but not the
byte sequence that M4 recognizes based on a different
encoding of those characters.  Remember, M4 is not
locale-aware yet.  Although I agree that using non-ASCII quotes
would eliminate ambiguity, it would make debugging tougher,
when the character appears correctly in the editor but is in the
wrong encoding.  And even though you can find editors that
support non-ASCII characters, it is harder to type such
characters using ASCII-based keyboards.  If we're going to
change the default quote sequence, at least pick one based
on multi-character ASCII.

-- 
Eric Blake




reply via email to

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