6 ms·
I like Rust for syntax, tooling, and ML ideas but I wish there was a "Rust-lite" that was garbage collected.
by throwaway894345 5y ago
I like Rust for syntax, tooling, and ML ideas but I wish there was a "Rust-lite" that was garbage collected.
- ChadNauseam 5y agoIt's got its warts, but Ocaml (and ReasonML if you want a more familiar syntax) are right in that sweet spot for me.
- throwaway894345 5y agoI need to give ReasonML another shot. It's been a few years, but at the time it really only seemed to work if you were targeting BuckleScript and even then you had to write a bunch of Makefiles and jump through other weird hoops. Beyond that, it suffered from some other OCaml issues--multiple "standard" libraries, different packages using different async libraries, some gratuitously abstract libraries, etc. I'm really hoping it breaks into the mainstream such that it gets the investment that other mainstream languages get (hopefully said investment will smooth out these rough edges).
- Serow225 5y agothat’s pretty much F# :)
- mumblemumble 5y agoAs a long-time F# user and current Rust learner, I would say the similarities are mostly cosmetic. First and foremost, F# is functional-first, while Rust isn't really functional. Rust takes some useful features from functional languages, to be sure, but the overall paradigm is more procedural. A lot of key functional idioms and design patterns don't really fly in Rust because it's difficult-to-impossible to make them play nice with its memory management model. Rust has traits, but not OOP. F# has OOP but not traits or typeclasses. F# is immutable by default, and discourages mutability. Rust is immutable by default, but embraces (and tames) mutability.
- throwaway894345 5y agoIf F# had static, native compilation by default, a closer Cargo analog, and eschewed the OO stuff (probably mostly just there for C# interop?) and the OCaml syntax.
- maficious 5y agoGleam
- throwaway894345 5y agoYeah, this is one I’m keeping my eye on.
- gpderetta 5y agowith its shared-nothing-by-default thread model, rust would make for an excellent GC'd language as if it gave the ability of opting into GC on a per-thread basis with thread local heap and GC. Some relaxing of the shared-xor-mutable probably would need to be relaxed though. I don't know how practical it would be to implement in practice.
- gcr 5y agohow do you feel about nim?
- throwaway894345 5y agoHaven’t looked much at it yet.