[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))
- Re: Tail call elimination, (continued)
- Re: Tail call elimination, Pete Dietl, 2020/05/20
- Re: Tail call elimination, Paul Smith, 2020/05/20
- Re: Tail call elimination, Daniel Herring, 2020/05/20
- Re: Tail call elimination, Pete Dietl, 2020/05/20
- Re: Tail call elimination, Pete Dietl, 2020/05/20
- Re: Tail call elimination, Paul Smith, 2020/05/21
- Re: Tail call elimination, Kevin R. Bulgrien, 2020/05/21
- Re: Tail call elimination, Paul Smith, 2020/05/21
- Re: Tail call elimination, Tim Murphy, 2020/05/21
- Re: Tail call elimination, Paul Smith, 2020/05/21
- Re: Tail call elimination,
Paul Smith <=
- Re: Tail call elimination, Kevin R. Bulgrien, 2020/05/21
- Re: Tail call elimination, Kevin R. Bulgrien, 2020/05/21
- Re: Tail call elimination, Paul Smith, 2020/05/21
- Re: Tail call elimination, Pete Dietl, 2020/05/21
- Re: Tail call elimination, Pete Dietl, 2020/05/22
- Re: Tail call elimination, Tim Murphy, 2020/05/22
- Re: Tail call elimination, Pete Dietl, 2020/05/23
- math expressions (was: Re: Tail call elimination), Paul Smith, 2020/05/23
- Re: math expressions (was: Re: Tail call elimination), Pete Dietl, 2020/05/23
- Re: math expressions (was: Re: Tail call elimination), Paul Smith, 2020/05/24