On 4/2/23 18:15, Emanuel Berg wrote:
David Christensen wrote:
Look at the use of parentheses in Lisp [...]
I have thought about that - is Lisp possible without them?
But how do you then know priority? I'm sure someone tried to
get rid of them, but how?
Its quite a few years since I had anything to do with Lisp, and even more since
I wrote my Symbolic Logic final using parenthesis-free Polish notation (i.e.,
Reversed RPN). But I think that
(a) Any syntactically correct Lisp expression could be unambiguously expressed
using Polish notation.
(b) It would be straightforward to build a tool that would do so for any valid
Lisp program (probably with lex and yacc or their successors).
(c) Adequate translation tools (either direction) could be hand-produced in
reasonable time using Perl (or Python, which I do not know at all). My memory
here is not necessarily reliable and therefore subject to correction.
Like my Logic instructor many years ago, I am not sure why anyone would want to
do that, though.
Overall, this has been a pretty interesting thread, at least to me.
Regards.
Tom Dial
( ...)