I'm in a situation where I need to embed a scripting language in a Swift codebase and had decided for Wren very recently since some form of coroutines are a necessity for me.
I understand Gravity also has Fibers.
Would you recommend me to investigate Gravity further?
It's a bit unclear what I would get from Gravity that I don't have in Wren. Maybe a slight different syntax?
Every now and then Gravity shows up on hn and it always makes me smile--a couple years ago I added some built-in array methods as one of my first forays into compilers and I had a lot of fun with it. Probably my first "real" OSS contribution.
@author: Why, given there are tons of good scripting langs already here?
(to other who didn't know what data-driven programming meant https://en.wikipedia.org/wiki/Data-driven_programming "In computer programming, data-driven programming is a programming paradigm in which the program statements describe the data to be matched and the processing required [...] Standard examples of data-driven languages are the text-processing languages sed and AWK")
Embeddable in C and able to work on iOS and Android would cut the list of comparisons down quite a bit.
TCL would be somewhat comparable, various embeddable JS interpreters, lua, etc.
"The compiler and virtual machine combined, add less than 200KB to the executable on a 64 bit system." would make lua perhaps the most obvious alternative. Perhaps they really wanted traditional class based OO.
I wanted to create a programming language with the following properties:
- Class-based
- A JS/Swift/Kotlin like syntax
- Bytecode generation
- A clear distinction between front-end and back-end so at runtime, we need only the VM related code to execute the bytecode
- Lightweight and easy embeddable
- Extensible/customizable via bridge API(s) exposed via delegation (no need to hack/modify the code)