If you ever try to write WAT by hand you realize that it's very much a compilation target, not something you'd ever want to manually write.
The restriction to only number types, is more a byproduct of trying to keep the 1.0 spec as mvp as possible, and reference types are gonna be a big shift in that regard.
I mean compare these two. One is a (very low level) language, the other is (high level) assembly.
https://developer.mozilla.org/en-US/docs/WebAssembly/Referen...
https://mapping-high-level-constructs-to-llvm-ir.readthedocs...
Lisp traditionally has immutable data structures and a garbage collector, in which case I would consider it more complicated than LO.
I would be very interested if it’s possible to create an extremely simple garbage collector or an ergonomic Lisp that isn’t garbage collected, but a solution doesn’t spring to mind.
And linked lists with reference counting are really easy to do, and don't have any leaks if you don't allow cons cell abuse. (which would mess with immutablity anyways)
You could also do linear types like carp [0], or you could just do manual memory management.
I feel like most people will call something with macros and s-expressions, a reasonable, if brutalist, lisp.
Can you provide a source for this? Common Lisp and its predecessors certainly do not have immutable data structures out of the box. The usual data structures are cons cells, lists (composed of cons cells anyway), vectors, and hash tables.
> I would be very interested if it’s possible to create an extremely simple garbage collector or an ergonomic Lisp that isn’t garbage collected, but a solution doesn’t spring to mind.
PreScheme immediately comes to mind for me as does ulisp. The latter in particular is designed for microcontrollers with limited memory.
I think the superset of WAT idea is very viable and someone more comfortable with s-expressions should explore that for sure.
https://developer.mozilla.org/en-US/docs/WebAssembly/Underst...
Low level forms for systems programming, and then everything else was built on top of it.
Picking something like "An Incremental Approach to Compiler Construction", but instead of Scheme, stay in WAT and move from there, adding features.
I personally wouldn't call anything Rust based "simple" (I'm not trying to hate on Rust, it's my daily driver.), so I have to ask: Wouldn't be the simplest possible wasm language, a small macro system for WAT, that bootstraps a slightly more highlevel lisp dialect?
Wasm already seems like an increadibly high-level language, given that it's a low-level compilation target.