posted on 2022-03-21

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.

posted on 2022-03-21

CC_ -1 License unless otherwise specified on individual pages, all posts on this website are licensed under the CC_-1 license.
unless explicitely mentioned, all content on this site was created by me; not by others nor AI.