Hacker News new | ask | show | jobs
by an_ko 3987 days ago
So it's basically an S-expression-syntax wrapper around Terra? So cool.

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.

3 comments

I like how in NoneLang the file is no longer a unit of abstraction. In that test example, the entire contents of the file is wrapped in an s-expression. This most likely means that entire programs and libraries can be concatenated and still remain valid.

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).

> I really wish more languages picked up S-expressions, because they're easy to machine-generate.

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.

do you have more information on that?
Take a look at some of the languages with quasiquotation-based metaprogramming: Template Haskell, Converge, Nemerle.

I did quite a bit of exploration in this area too, here is one of the examples: https://github.com/combinatorylogic/clike

Excuse me, I want to discuss something with you. Please, write on my email lambda.ronin@gmail.com
> I really wish more languages picked up S-expressions, because they're easy to machine-generate.

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!

If the language has a large enough community, someone's bound to come up with an AST format and parser/generator themselves.

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