bug-make
[Top][All Lists]
Advanced

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

Re: Why call is not calling like native primitives? even when var is oth


From: Kyle Rose
Subject: Re: Why call is not calling like native primitives? even when var is otherwise undef?
Date: Mon, 21 May 2018 12:17:45 -0400

On 2018-05-21 at 07:46, Kyle Rose wrote:
> $(call x) rebinds the positional parameters. $x and $(x) do not. This
> distinction is used to break macro logic into smaller pieces in which $1 et
> al. still refer to the positional parameters from the top-level macro
> instead of being rebound to the empty string.

My suggestion was for only variable names containing a space, so $(x)
would keep legacy behavior, while $(x y) would work as any function
call.


I've had the same thought myself. This would probably work, but it needs to do something consistent and understandable in cases like these:

$(fn) <= variable evaluation
$(fn literal) <= macro expansion
$(fn $x) <= macro expansion, even if $x is empty
$(fn ) <= ?? maybe macro expansion?

Kyle


reply via email to

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