[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: |
Wed, 20 May 2020 13:42:11 -0400 |
On Wed, 2020-05-20 at 11:48 -0500, Pete Dietl wrote:
> Another option would be to introduce some new syntax like $(()),
> but that might break existing Makefiles and would probably be more
> work, though it looks cleaner IMO.
No, I don't agree with that. Trying to change the base make parser
like that would be a major source of issues.
There is already a simple way to hook in a new make function, and any
new capabilities need to fit within the current function invocation
model rather than creating brand-new top-level syntax.
> > Grouping: do we try to implement expression grouping with () (e.g.,
> > $(expr (1 + 1) * 4) or is it good enough to just say people need to
> > nest expr functions: $(expr $(expr 1 + 1) * 4)?
>
> I think nesting `expr` is too noisy.
We need to find a good balance between implementation complexity and
"noisy use".
Remember that GNU make has existed for 30+ years without any math
operations at all! Although some simple math operations would be
useful in many situations and improve portability by avoiding the need
to shell out, no one is going to be implementing MATLAB in a makefile.
My point is, it's not necessary for this to have the most beautiful,
streamlined syntax because it will appear only in a few places, and in
relatively simple contexts. If it's easier to fall back on make's
existing expansion facilities than to implement grouping, we should
fall back.
- Re: string comparison operators (was: Re: Tail call elimination), (continued)
- Re: string comparison operators (was: Re: Tail call elimination), Paul Smith, 2020/05/18
- Re: Tail call elimination, Daniel Herring, 2020/05/18
- Re: Tail call elimination, Paul Smith, 2020/05/19
- Re: Tail call elimination, Tim Murphy, 2020/05/19
- math expressions (was: Re: Tail call elimination), Paul Smith, 2020/05/19
- Re: Tail call elimination, Pete Dietl, 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, Paul Smith, 2020/05/20
- Re: Tail call elimination, Pete Dietl, 2020/05/20
- Re: Tail call elimination,
Paul Smith <=
- 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, 2020/05/21
- Re: Tail call elimination, Kevin R. Bulgrien, 2020/05/21