Re:An Intuition for Lisp Syntax
by ChrisSD on Monday October 26, 2020 @12:13AM
(#24892771)
The formal Scheme syntax spec is, what?, a few pages. Far smaller than any other "real" language I'm aware.
[ Parent
| on HN ]
I'm not too familiar with scheme, but syntax seems to be at least a few dozen pages here? www.r6rs.org/final/r6rs.pdf
Also compare https://people.csail.mit.edu/jaffer/r5rs_9.html and e.g. https://docs.python.org/3/reference/grammar.html which I would consider a relatively syntactically rich language.
R6RS was the largest Scheme spec ever, and because of it the next one was actually reduced into two: R7RS-small (core-language) and R7RS-big (extended).
The R7RS-small standard [0] has already been ratified. It is a similar size to R6RS as a document size, but the semantics are about 8 pages, and include a bunch of macros that you don't need to implement, but just copy and paste into your implementation.
I'd say it's a similar sized grammar to Python's.
What I see is that the Scheme one is a lot more thorough and still shorter.
Real schemes are much more complicated. I think he’s talking about Common Lisp though.
I enjoy lisp/scheme syntax, but I'm especially impressed by lua's simple, readable, flexible, whitespace-insensitive-but-whitespace-friendly syntax. It is a bit more complicated than scheme's, but more intuitive because you don't need to explain quasi-quoting and other lisp-specific stuff.
https://www.lua.org/manual/5.4/manual.html#9