Guy Steel performed a phone interview with John McCarthy at an OOPSLA, about the history of Lisp. He didn’t actually say “AST is king”, but that’s what I took from the interview.
He did talk about ASTs (abstract syntax trees) a lot though. Specifically, two points stuck in my mind.
First, a programming language should have access to it’s own AST. This means the structure of the program, apart from the characters used to represent it. Lisp had this in it’s infamous macros.
Second, a language should have multiple concrete syntaxes, all built on the same AST and all for different purposes. Some of the purposes McCarthy mentioned:
- Easy to write
- Easy to read
- Abstract, for language theorists and mathematicians
- Easy for programs to process
These are not entirely new concepts. Some of Ruby’s popularity may be due to the language’s malleability, though you’d need add-ons for full AST access. it also has a lot of syntax, which try’s to shove the easy read/write into one, where they butt heads sometimes. I also understand it’s AST was based on Lisp-style s-expressions.
Multiple syntaxes haven’t been lost on everyone. Fortress has mathematical printing syntax and a wiki-like shorthand for writing. Fortress of course is perhaps not coincidentally a project of Steele, who I gather is an old Lisp guy and a compatriot of McCarthy.
Intentional Software also shipped recently, although they are still keeping it low key and expanding conservatively. Intentional’s idea is loosely “one AST to rule them all” with transformations (some one-way, some two-way) to various syntaxes or graphs, with specific attention to domain specific languages.
Perhaps I should also mention Jonathan Edward’s Subtext-come-Coherence, which is targeting a pure non-textual AST as the main representation, which might edited in either graphical or textual projections.
I might have had some ideas like this too – scroll to Universal Programming System, I seem to have neglected to put anchors on this page.