Probably wiser to use a lighter weight tool that you have source control over?
Lobster has been doing the rounds on twitter recently. There's a minecraft-like example in 66 lines of code that could be used as an example editor which would make more sense when it comes to serializing the data for your own purposes.
A while back, the guy who made Sauerbraten invented a programming language just for game programming. However, I was never able to make it work, and for all I know it may have been abandoned shortly after release.
C++ (for http://strlen.com/lobster/). The motivation was that the compiler & runtime can easily be integrated in other projects, which in my case are typically game engines, which tend to be in C++. Also, having the compiler and runtime in the same language is kinda nice, and the runtime definitely needs either C or C++ (or Rust with a TON of unsafe). I started the project in 2011, so Rust wasn't on my radar as a choice, that probably would have been a better choice. Do I recommend it? I'd say the compiler part could have definitely been in an easier language, as it is not particularly performance sensitive. Might at some point rewrite it in the language itself :) Modern C++ is a relatively comfortable language if.. you've been using it since forever :).
Maybe Lobster, which has a similar goal. The Programming Languages section is also worth looking at; it contains a number of unorthodox and still interesting research programming languages (some of them esoteric, guaranteed :).
You might want to have a look at http://strlen.com/lobster/
While not a functional language per se, it is a language with a heavy focus on higher order functions and type inference, and is targeting quick game prototyping first and foremost.
See Lobster, which has "Compile time reference counting / lifetime analysis / borrow checker".
Regarding a "less strict Rust," I'm intrigued by the slightly fictional R++ language in Esteban Küber's Rustconf talk, and wonder whether it might be made into a real language. Softening the distinction between owned and borrowed reference, perhaps doing a similar analysis as Lobster, could be interesting.
This and the Lobster programming language seem to have memory management systems that are evolutions of Rust's. Are you aware of Lobster? If so, what are your thoughts on it? If not, you might find its type system and approach to memory management interesting.
Not really a "smaller Rust", but certainly a language that does Rust-y things (lifetime analysis) without getting in the users way (it's all automatic) is http://strlen.com/lobster/
It does "compile time reference counting" (http://aardappel.github.io/lobster/memory_management.html) which moves almost all memory management to compile time. The end result is a language which you can program while mostly ignoring ownership, and still get the benefits.
The article also mentions the desire for "control-flow-capturing closures" as in Kotlin, which Lobster has too (non-local returns).
I've been reworking the control flow implementation of the native code backend of my language Lobster. It used to be based on some form of continuations, where functions would return the functions to call next to a trampoline, because of advanced control flow features like non-local returns and co-routines. This would inhibit many kinds of optimizations though, so now I am reworking things such that most local forms of control flow can be simple jumps, and the non-local ones have explicit checks only when used, which should be much cheaper. This then will allow further optimisations to the way function calling is done, etc.
This wasn't easy, because I also have a Wasm backend, and since that doesn't have arbitrary jumps (only "structured control flow"), I had to invent new ways to emit hints in the backend specific to Wasm.
I do exactly this kind of analysis (on an AST) in my pet language, http://strlen.com/lobster/, which has nullable types. It propagates the "promoted" non-null types across and
/ or
operations, and also to branches of an if
it sits in, and a few other contexts. More details under "the trouble with nil" here: http://aardappel.github.io/lobster/type_checker.html
I point to where in the implementation this happens, if you feel like seeing an example.
Edit: language has no goto
. Type-checking happens in call-graph order, which makes a lot of these things simpler.
x: e
Which can be put right after the function that takes it as an arg, so:
filter(list) x: x < 5
Filter is a function that takes 2 args.
This is especially nice with the Python-esque multi-line syntax this language has:
filter(list) x: let y = ... x < y
Or, shortcut:
filter(list): _ < 5
So after diagnose-ast
you can run the program without the type checking phase?
If so that makes sense to me, and it seems like the most realistic route to solving the "type checker is slow and global" problem.
The lobster language apparently has two execution modes. It started out dynamically typed with bytecode, but it does type inference and can generate fast code now.
I think I've seen other languages like this too but I'm drawing a blank.
> We love the even greater simplicity of Python but see similar issues there and are wary of dynamic typing
Might I point you to this pythonesque statically typed programming language then: http://strlen.com/lobster/ :)