Re:Moonbit: The fast, compact and user friendly language for...
by wffurr on Saturday August 19, 2023 @10:45AM
(#37189323)
For that world there is also Rhai (https://github.com/rhaiscript/rhai), TypeScript, Scheme, etc.
Though Moonbit does look nice too.
Re:Moonbit: The fast, compact and user friendly language for...
by afavour on Saturday August 19, 2023 @10:50AM
(#37189374)
> one can't help but imagine a Rust-but-with-GC world
Rust with reference counting gets you a long way there. I’ve leaned in Rc<> a ton in some projects and had a pretty great experience.
Re:Moonbit: The fast, compact and user friendly language for...
by mmastrac on Saturday August 19, 2023 @11:12AM
(#37189578)
I built https://github.com/mmastrac/keepcalm/ to specifically give "permission" to use ref-counting to make your life easier. For a webserver, references don't make any sense and really don't add anything measurable from a performance perspective.
Re:Moonbit: The fast, compact and user friendly language for...
by afavour on Saturday August 19, 2023 @12:01PM
(#37190087)
That’s awesome. I do think someone smarter than me needs to write a “Pragmatic Rust” book, or something. The complexities around references and lifetimes put a lot of people off but really aren’t necessary a lot of the time.
Re:Moonbit: The fast, compact and user friendly language for...
by necrophcodr on Sunday August 20, 2023 @07:00AM
(#37197972)
If you want some of the ergonomics and DX of Rust, but in a GC'd language, OCaml (the language also used to implement early Rust compilers) might be more the path to be taken. Great tooling, handlings errors in sensible ways, and pattern matching, allows you to move business logic faster and focus on shaping data rather than transforming the bytes of them.
As it is now, though, regrettably Rust imposes on you the penalty of dealing with borrowing and ownership even when there is no reason to pay for that. Its not too bad in most cases but one can't help but imagine a Rust-but-with-GC world :)