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 13:02:18 -0400

On Thu, 2020-05-21 at 11:46 -0400, Paul Smith wrote:
> In my discussion of the way to handle conditions I even mentioned
> allowing just one operand which would give the identity function.
> 
> After sleeping on it, though, I'm not sure if that's the best idea. 
> Maybe we should assume "0" for a missing operand regardless of the
> operator.
> 
> That would mean $(op + 7 $(op < 10 5)) would be 7, but
> $(op * 7 $(op < 10 5)) would be 0.  That seems like it would be more
> useful behavior than always choosing identity.

Or if this seems like too much magic, we could throw an error for a
single operand and people could play a trick like this:

  $(op * 7 0$(op < 10 5))

(this means we cannot use leading 0 to mean octal form of course... I
think that is going out of style anyway as too ambiguous).

Or just write it all the way out:

  $(op * 7 $(if $(op < 10 5),1,0))





reply via email to

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