[Top][All Lists]

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

Re: named arguments in m4?

From: Gary V. Vaughan
Subject: Re: named arguments in m4?
Date: Mon, 21 Apr 2014 22:53:37 +0700

> On Apr 21, 2014, at 7:19 PM, Eric Blake <address@hidden> wrote:
>> On 04/20/2014 04:36 PM, Daniel Goldman wrote:
>> Hi,
>> Any chance m4 could (or would want to) support named arguments? In other
>> environments, I usually prefer named arguments over $n arguments.
> Interesting question.  The master branch of m4.git (which is currently
> highly experimental and nowhere near a release) agrees with you, and did
> attempt to add named argument support.  But we're a long way off from
> ever making it actually useful enough to release; right now, the
> development is focused on the stable branch-1.4 branch.

For the record, the syntax I briefly implemented simply involved defining a 
with a parameter list, and then referring to parameters by name in the body of 

  m4_define(`exch (parm1, parm2)', `$parm2 $parm1')
  exch(`foo', `bar')
  bar foo

It's still something I'd like to have one day, but I'm not sure I like that 

Gary V. Vaughan (gary AT gnu DOT org)

reply via email to

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