[Top][All Lists]

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

Re: Tail call elimination

From: Kevin R. Bulgrien
Subject: Re: Tail call elimination
Date: Thu, 21 May 2020 11:22:11 -0500 (CDT)

> 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.

I plan to bow out of this discussion as I'm not vested in it, but, a
distinguishing significant functional or interpretive difference
between these two forms is not self-evident:


   FILE_SIZES := 5 2 1 4
   TOTAL :- $(math +, $(FILE_SIZES))


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

In my mind, TOTAL obviously ends up with the same value, but, 1) is more
readable in the same way that almost any language is more readable than
perl with all its non-alpha shortcuts.

If there is a clear difference, then perhaps a more convincing description
could be made, but all the "math" comment was doing was to make something
a whole lot more clear than "op" (i.e. operand, operator, opportunity, ad

I'll add that it isn't exactly necessary to create a "new" way of mixing
dissimilar arguments (i.e. numbers and operators).  Everyone thinks their
new idea is better (including me), but it seems that the rest of the world
appreciates maintaining order along the lines of the principle of least

After looking over the list of existing functions (again), I don't think I
see one example of a pre-existing function that doesn't use comma when
different types of arguments are used.  Commas aren't used where all the
values are similar... as in $(sort ...), $(words ...), $(lastword ...), etc.
I'm not sure what is hard to understand about this being a good thing, and
that having an operator in a list of numbers has the potential to create a
lot more confusion when looking at the way make works with other functions.

Later, and enjoy...

reply via email to

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