6 ms·
I feel like it should be trivial to make a 'scripting' variant of rust. Just by automatically wrapping values in Box/Rc when needed a lot of the cognitive overh
by jaggirs 6y ago
I feel like it should be trivial to make a 'scripting' variant of rust. Just by automatically wrapping values in Box/Rc when needed a lot of the cognitive overhead of writing Rust could be avoided. Add a repl to that and you have a highly productive and performant language, with the added benefit that you can always drop down to the real Rust backbone when fine-grained control is needed.
- grandmczeb 6y agoCheck out Rune: https://rune-rs.github.io/ https://rune-rs.github.io/ It’s more of a prototype, but I think it’s in the direction you’re describing.
- aidanhs 6y agoSimiliar to GP, I too have been wondering about a Rc'd Rust. Unfortunately Rune and Dyon[0] are dynamically typed, which isn't so attractive to me. More promising are Gluon and Mun, both of which are statically typed. Of these two, Gluon has a somewhat alien syntax if you're coming from Rust (it notes it's inspired by Lua, OCaml and Haskell) so Mun is probably a better choice...but it seems very early, and the website notes as much (to serve the needs of a Rust-scripting-language I'd want seamless interop between it and Rust, which isn't quite there). So I don't think there's anything in this space right now, but there are some promising options. If you're wiling to go a little further afield, I'm kind interested in assemblyscript[3] - it's 'just' another WASM-based language so it's not a huge leap of imagination to believe there could be tooling to enable the seamless Rust interop. Just a matter of effort! [0] https://github.com/PistonDevelopers/dyon https://github.com/PistonDevelopers/dyon [1] https://github.com/gluon-lang/gluon https://github.com/gluon-lang/gluon [2] https://github.com/mun-lang/mun https://github.com/mun-lang/mun [3] https://www.assemblyscript.org/ https://www.assemblyscript.org/
- athriren 6y agogluon looks great, but the book site is down for some reason, which is unfortunate since i am looking for something nearly exactly like this.