Re: Lark - A surface syntax for Common Lisp

"Yuri Davidovsky (as work at disclosure dot ie)" <[email protected]>
Newsgroups gmane.lisp.lispworks.general
Message-ID <[email protected]>
> On 15 Feb 2026, at 16:49, David McClain (as dbm at refined-audiometrics dot com) <[email protected]> wrote:
> 
> the existing S-expr surface syntax is a huge reason for the enormous utility of Lisp macros.

This is indeed true. The reason for that is that a piece of Lisp code is essentially an AST (abstract syntax tree), the distilled structure of any program that you get in any other language after you have tokenised and parsed it. That makes code generation easy since you are looking at a very regular syntax — a simple list of lists (or some would call it a tree). Syntaxes of other languages essentially are nothing but concealment of this very regular structure of the program and the irregularity of their grammar rules makes it more difficult to generate their code programmatically, hence the reason why people familiar with Lisp typically find other languages’ macro facilities underwhelming.

McCarthy was probably the first person to conceptualise the AST, but it wasn’t his intention, from what I understand — he just was playing with ideas for a new programming language and naturally arrived at the most simple syntax that would allow him to try things without having to redefine the grammar of the language all the time. It was a by-product of his research, not a final destination, I think he did not even realise what he in fact discovered at the time.

Not that ASTs weren’t known of in those times — compiled programming languages existed already and that necessitates abstract syntax tree existence, it is just more likely that people did not recognise them as an entity of their own yet and McCarthy was one of the first to use them as a tool (for language design in this case). As been said, he did not think much of it at the time and fully intended on creating a proper syntax (the m-expressions), but apparently the early testers of this new language did not mind the simplified (and slightly awkward due to the numerous parentheses) syntax, and lisp was left at that — with the s-expressions.

So in essence Lisp wasn’t invented — it was discovered, to which s-expressions are the very testament.

_______________________________________________
Lisp Hug - the mailing list for LispWorks users
[email protected]
http://www.lispworks.com/support/lisp-hug.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.