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 01:17:32 -0400

On Wed, 2020-05-20 at 19:56 -0500, Pete Dietl wrote:
> Paul when you get a chance, could you let me know what you think
> about using many prefix functions?

I'm not sure.  I may need to see the proposal to get a feel for what it
really means.

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.

I guess the question is, is math worth adding a big passel of new
functions and sucking down all those potential future names for
functions.  Maybe it is, not sure.

As I said I might need to just see the scope of the proposal.  But
anyway it shouldn't need to change too much: I agree that prefix
notation is the right solution however the details work out.

Also needed is some definition of how boolean operators work.

I'm tempted to suggest something like, if the boolean operator is
false, it expands to the empty string as always.  If true, it expands
to 1.  This will allow boolean operations to included in math
operations as well, something like:

  $(op + $(words $(foo)) $(op < $(words foo) 10))

or whatever (this implies that prefix operators should be allowed to
take a single argument, which would be the identity function for that
operator... so $(op * 5) would be 5, and $(op + 7) would be 7).




reply via email to

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