bug-make
[Top][All Lists]
Advanced

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

Re: Tail call elimination


From: Paul Smith
Subject: Re: Tail call elimination
Date: Thu, 21 May 2020 09:07:59 -0400

On Thu, 2020-05-21 at 00:37 -0500, Kevin R. Bulgrien wrote:
> > Of course we can still do prefix notation with a single function we
> > just have to choose a name for it and it's a little less slick; for
> > example something like:
> > 
> >    $(op + 5 7 $(op * 3 2) 9)
> > 
> > or whatever so the function is named "op" (for example).  Or it
> > could be named something else like "=", if "= +" doesn't seem too
> > odd.
> 
> Is "math" a possible function name?

If you mean, is it already used for something else then no, it's
available.

As they say, naming is one of the two hard things in computer science.

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




reply via email to

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