[Top][All Lists]

[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:55:00 -0400

On Wed, 2020-05-20 at 17:17 +0000, Tim Murphy wrote:
> So if guile is a good language which does math in postfix notation
> (+ 1 1)

You mean prefix notation :)

I do have fond memories of postfix notation from my HP calculator but
it wouldn't work for GNU make.

> then I don't see why make can't be the same and since this is roughly
> the way make operations work now you can avoid inventing a lot of
> rules about what you "might need" in future.

I don't have a problem with prefix notation per se.  You're right it
does mean we don't have to care at all about grouping or associativity
issues, and we can just rely on make's already-existing parsing

This would mean: $(+ 5 $(* 7 2 3) 9) --> 56

However, it does mean we have to implement a lot of little functions
(one for each operator) rather than one function that can do all the

Maybe that's still a good tradeoff.

reply via email to

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