Composable Syntax (2016)
twitter extempore! On principle of composable syntax.
in golang, to create a hashtable, syntax is
make(map[string]int)
, key is string, val is int
this syntax is not decomposable. it is just one ad hoc blob.
principle of composable syntax is like functions in functional programing, you combine functions to create variations.
with composable syntax, you only need to understand a handful of patterns, then can understand the syntax, any source code.
example of language with composable syntax includes Wolfram Language, lisp (trivially), APL
sad is that haskell, ocaml uses a ad hoc syntax, similar to the way C syntax, or golang is cooked up
most lang's syntax do not have theory. they tend to be just ad hoc, era habit, evolved. typically borrowed from previous langs
also sad is that clojure mutates lisp's composable syntax into ad hoc complexity, by macro, reader macro, special form, exceptions
Clojure: Magic Characters Clojure: Variable Name Conventions
Systematic Grammar
- Why Syntax is More Important Than Semantics (2020)
- Formal Definition of Systematic Grammar (2016)
- Grammar Complexity of conlang and complang (2016)
- Composable Syntax (2016)
- Syntax Algebra (2016)
- Syntactic Meaning of Variable (2018)
- OCaml Syntax Sucks (2016)
- Problem of Expressive Programing Languages (2021)