If you can't make first-class functions that are the equal of $(filter) or $(subst) or whatever, or indeed replace them, then it seems like a bit of a fudge for the sake of 4 characters.
I think one could end up having huge discussions about this to a pretty limited benefit and miss spending the time on some of your other proposals which get around really significant problems. Regards, Tim On Mon, 10 Jun 2019 at 04:46, David A. Wheeler <dwhee...@dwheeler.com> wrote: > On Mon, 10 Jun 2019 11:56:04 +0900, Masahiro Yamada <masahi...@kernel.org> > wrote: > > It is a design. > > Sure, but we can add to it. > > > In summary, there is slight difference between > > a variable and a user-defined function. > > Omitting 'call' makes obscure the difference between them. > > I don't think it obscures the difference at all. > The presence of parameters makes the difference quite obvious. > > Let's use the examples from: > https://www.gnu.org/software/make/manual/html_node/Call-Function.html > > # Current: > foo = $(call reverse,a,b) > # Proposed alternative: > foo = $(reverse a,b) > > # Current: > LS := $(call pathsearch,ls) > # Proposed alternative: > LS := $(pathsearch ls) > > > # Current: > o = $(call map,origin,o map MAKE) > # Proposed alternative: > o = $(map origin,o map MAKE) > > > There is *one* case I can agree would be obscure. > That would be a space with NO parameters. E.g., $(hello ). > That's more likely to be an error than a function call. > So perhaps the short form should require something other than a ")" > right after the name's whitespace; if you want to call a function > with no parameters (why?) you'd be required to use $(call NAME). > I'd be happy with that limitation on the syntactic sugar. > > --- David A. Wheeler > _______________________________________________ > Bug-make mailing list > Bug-make@gnu.org > https://lists.gnu.org/mailman/listinfo/bug-make >
_______________________________________________ Bug-make mailing list Bug-make@gnu.org https://lists.gnu.org/mailman/listinfo/bug-make