Lisp
Last update: Tue Jun 16 21:32:18 EEST 2026
Lisp is nice. Nice for metaprogramming in particular due to its homoiconicity.
We could use with a more modern dialect in the spirit of something like Lua and Go.
Now there’s obviously been many different dialects of Lisp over the years including newer ones like Clojure and Arc but I feel like those haven’t really taken the path that I would’ve wanted. Closure is very useful for the ones who like but to me as someone who used to write a lot of Common Lisp I feel like it hasn’t been the one for me.
(:= fib (fn (n)
(if (= n 0) 0
(= n 1) 1
(+ (fib (- n 1))
(fib (- n 2))))))
(:= fac (fn (n)
(if (= n 0) 1
(* n (fac (- n 1)))))
So let’s talk through what that kind of Lisp would look like.
In Lua the reserved keywords are:
and, break, do, else, elseif, end, false, for, function, if, in,
local, nil, not, or, repeat, return, then, true, until, while
I’d prefer a system without many reserved words. In the spirit of Lisp I’d rather have no real separation between keywords and built-in or standard library functions.
As said in the book Structure and Interpretation of Computer Programs by Abelson, Sussman and Sussman:[1]
A powerful programming language is more than just a means for instructing a computer to perform tasks. The language also serves as a framework within which we organize our ideas about processes. Thus, when we describe a language, we should pay particular attention to the means that the language provides for combining simple ideas to form more complex ideas. Every powerful language has three mechanisms for accomplishing this:
-
primitive expressions, which represent the simplest entities the language is concerned with,
-
means of combination, by which compound elements are built from simpler ones, and
-
means of abstraction, by which compound elements can be named and manipulated as units.
So there’s primitives, composition and abstraction. The primitives will have to include values and operators. By values I mean things like integers, string and because we’re talking about Lisp there also needs to be symbol. None of the things so far are fixed things in the language perhaps apart from the symbol which goes with the mandatory need to substitute them for the values assigned to them as variables. But do things such as parentheses need to be built-ins or can they also be operators?
Lisp being expression-oriented this language should also obviously be expression-based. But I’d prefer to have tuples more natively in the language right from the start and perhaps a whole range of other convenient shorthand syntax as well.
For example access to fields could be either with a dot or a colon.
I’d say that this needs to be implemented in Go primarily and also perhaps in Javascript so that it’s available in the browser.
(if (test expr)* else-expr?)
(for ...)
(fn ... ...)
(let ... ...) # just syntactic sugar for ((fn))?
# comment
nil . () [] ` , @ ' "
:= # creates a new var in the current scope
# how to do assignment to an existing var? = is comparison not assignment
# how to do Go's channel primitives?
# replace let with {}?
# or how to express maps natively in syntax?
Abelson, H., Sussman, G. J., & Sussman, J. (1996). Structure and interpretation of computer programs (2nd ed.). MIT Press. ↩︎