I really wish more languages picked up S-expressions, because they're easy to machine-generate. I can't count the number of times I've been annoyed at my otherwise favourite languages for not being able to do that.
I really wish more languages picked up S-expressions, because they're easy to machine-generate. I can't count the number of times I've been annoyed at my otherwise favourite languages for not being able to do that.
I absolutely love this mixture of a Lisp hosted on Terra so it can take advantage of the optional static typing.
If someone wanted to do something similar for Python they could use Hy and MyPy (would need LLVM backend).
There is an easy way to generate pretty much any AST using quasiquotations. S-expressions are nice, but certainly not mandatory for a full metaprogramming.
I did quite a bit of exploration in this area too, here is one of the examples: https://github.com/combinatorylogic/clike
This could easily be solved using a well-defined AST and a simple s-expression based AST printer/parser. That not many languages do that (one notable exception is Julia) is a shame!
JavaScript has https://github.com/estree/estree for example. I've written a (very experimental) S-expression syntax for JavaScript around it here https://github.com/anko/eslisp