[Top][All Lists]

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

Re: Tail call elimination

From: Tim Murphy
Subject: Re: Tail call elimination
Date: Thu, 21 May 2020 15:35:19 +0000

On Thu, 21 May 2020 at 13:08, Paul Smith <address@hidden> wrote:

> Other function syntax where there are "different" types of parameters
> or arguments (i.e. subst, patsubst, findstring, filter, etc.), use a
> syntax something like:
> $(math operator, value list)
> Consistent syntax patterns are often a plus.  ;-)

Well, we also have functions which don't use a comma: it's used where
needed to make a distinction between "arguments" to the function.  If
we ever anticipate having multiple operators (separated by whitespace)
we might want to consider using a comma.

Otherwise, I'm not sure.  It's true that make functions separate using
commas, but on the other hand people used to prefix syntax certainly
won't expect to have to enter an extra comma and will find that very

There's something to be said for this being able potentially to work - not that I'm pushing it mind:

FILE_SIZES:= 5 2 1 4
TOTAL:=$(+ $(FILE_SIZES)) # TOTAL is 5+2+1+4

Here I'm not objecting to ($math +,$(FILE_SIZES)) or $(op +,$(FILE_SIZES)) - whatever on them - I am only trying to point out that we naturally iterate over lists of things in make  (e.g. of targets or filenames) which are space or tab separated and if you could put a list of numbers into an operation and it just worked it could be quite neat.  It would obviously permit some error cases to be expressed which could be undesirable e.g. $(/ 1 2 3) could be a bit ambiguous or at least an unwanted possibility. 



reply via email to

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