autoconf-patches
[Top][All Lists]
Advanced

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

Re: proposed autoconf patches for AS_BASENAME, AS_DIRNAME


From: Paul Eggert
Subject: Re: proposed autoconf patches for AS_BASENAME, AS_DIRNAME
Date: Fri, 19 Oct 2001 09:30:49 -0700 (PDT)

> From: Akim Demaille <address@hidden>
> Date: 19 Oct 2001 17:04:28 +0200

> | +test "$dir" = "$2" || (test -n "$3" && test "$dir" = "$3") ||
> |    echo "dirname($1) = $dir instead of $2" >&2
> 
> On a stylistic note, just to teach a bit of m4sugar
> 
> | +test "$dir" = "$2"m4_ifval([$3], [ || test "$dir" = "$3"]) ||
> |    echo "dirname($1) = $dir instead of $2" >&2

I wrote it with m4_ifval first, but I found it harder to read that
way, so I changed it to use the shell before I installed it.

I found it harder to read for the same reason that I find

       if (x)
         y;
   #if FOO
       else if (z)
         w;
   #endif

harder to read than

       if (x)
         y;
       else if (FOO && z)
         w;

Agreed, it's just a style thing.



reply via email to

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