the word "syntax" in programming, linguistics and LISP

in programming, the word "syntax" is used to describe quite superficial characteristics of a programming language: what an if/else statement looks like, how instructions are separated, how string literals are written and escaped, things like that.

in linguistics, the word carries a deeper meaning: "syntax" refers to all the ways words are structured together and include grammatical tenses and the like; it cares about how the tokens relate to each other in a complex way which in programming would be moreso described as being about e.g. types.

in LISP, as opposed to most programming languages, i feel like the term syntax has been reappropriated to be closer to its linguistic use: it refers to how macros (or fexprs) manipulate expressions in a more profound way, more akin to the linguistic usage of the term; see notably Scheme's define-syntax special form.

so while from an outside perspective, "LISP syntax is very simple" can be true in a straightforward sense, it misses the whole point of LISP: that its true, deep syntax is arbitrarily complex, dynamic, and manipulable.

RSS feed available here; new posts are also linked on my twitter.
CC_ -1 License Unless otherwise specified on individual pages, all posts on this website are licensed under the CC_-1 license.
This site lives at https://carado.moe and /ipns/k51qzi5uqu5di8qtoflxvwoza3hm88f5osoogsv4ulmhurge2etp9d37gb6qe9.