So here’s a weird thing that happened: I heard that it is possible to write a (interpreter for a small) programming language in one weekend, so I tried and yes it’s possible.
The project began with me needing a multiparadim scripting languages that can be interpreted by elm. Because nobody has done this before, I decided to work on a Lua based language. Originally, I wanted to stay as true to Lua as possible, but there are a few things (like variables being global by default) that I refused to implement.
I’ve nothing yet to show (mostly because I want to finish the documentation before i share the repos) but here a quick code snipped:
let success = "great";
mut out = null;
out =
if { mut a = out; --out is immutible inside this scope
a =
40
. Number::plus 2 --Number is an extension to the language
. eq 42; --the definition of eq is written in a seperate Elm package
a --a body always ends with an expression
}
success
out;
out --Returns "great".
Now the thing is, this a nice little language and all, but I can’t support an ecosystem for it. In the best case, I would not have created a new language to begin with.
I’m willing to start from scratch, if someone can point me towards an existing language that
- is small (enough, so that i can write an interpreter in a weekend)
- is multiparadime
- dynamically typed (type checkers are hard work to write >.<)
- is extendable (just like lua)
- has a c-like syntax (i know lisp exists, i just don’t like its syntax)