libtool
[Top][All Lists]
Advanced

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

Re: I think binary-branch is almost ready for play time


From: Bruce Korb
Subject: Re: I think binary-branch is almost ready for play time
Date: Sun, 13 May 2001 16:30:12 -0700

Alexandre Oliva wrote:

> Indeed, it does.  I'm close to being convinced.  The final test is
> going to be this: I'd like to implement test-and-exit in terms of a
> new macro, namely, test, that takes arguments such as the test to be
> performed, the if clause and the else clause.

OK.  Just so you know, if you pass a named argument "mumble"
to macro "foo" and that macro invokes another named, "bar",
the "bar" macro has access to "mumble" unless "foo" creates
another definition context for it in its argument list for "bar".
In other words, your new macro should not need to do this:

   [= test-and-exit  test = (get "test")  ...  =]

because it would be redundant.

> This will show me how hard it is to define macros in terms of others.
> If it's simple enough, you've got a buy in.
> 
> I must confess that I dislike AutoGen's syntax, heavily loaded with [=
> and =], but I'm sure it's just a matter of getting used to it.

So, you don't like [+ and +] either? ;-)
I know that there is some aesthetic benefit to tokenizing the input
a la M4, but it has some quoting confusion drawbacks, too.  This 
technique completely separates the domain of AG directives and
the output text.  You _can_ use a single character, as long as you
can be sure it is unique within the template.  I use [= and =] a
lot because they are close together and don't require holding the
shift key.  :-)

> Named arguments in macro invocations are sometimes a nuisance,
> but they can also be a plus.

I find them convenient.  I always prefer typing to lack of clarity.
It also makes the calling sequence extensible and flexible.
I like that, too.

Regards,
        Bruce



reply via email to

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