←back to thread

611 points LorenDB | 3 comments | | HN request time: 0s | source
Show context
bunderbunder ◴[] No.43916848[source]
This is actually the point where Rust starts to frustrate me a little bit.

Not because Rust is doing anything wrong here, but because the first well-known language to really get some of these things right also happens to be a fairly low-level systems language with manual memory management.

A lot of my colleagues seem to primarily be falling in love with Rust because it's doing a good job at some basic things that have been well-known among us "academic" functional programming nerds for decades, and that's good. It arguably made inroads where functional programming languages could not because it's really more of a procedural language, and that's also good. Procedural programming is a criminally underrated and misunderstood paradigm. (As much as I love FP, that level of standoffishness about mutation and state isn't any more pragmatic than OOP being so hype about late binding that every type must support it regardless of whether it makes sense in that case.)

But they're also thoroughly nerdsniped by the borrow checker. I get it, you have to get cozy with the borrow checker if you want to use Rust. But it seems like the moral opposite of sour grapes to me. The honest truth is that, for most the software we're writing, a garbage collected heap is fine. Better, even. Shared-nothing multithreading is fine. Better, even.

So now we're doing more and more things in Rust. Which I understand. But I keep wishing that I could also have a Rust-like language that just lets me have a garbage collector for the 95% of my work where the occasional 50ms pause during run-time just isn't a big enough problem to justify a 50% increase in development and maintenance effort. And then save Rust for the things that actually do need to be unmanaged. Which is maybe 5% of my actual work, even if I have to admit that it often feels like 95% of the fun.

replies(5): >>43917143 #>>43917417 #>>43922534 #>>43923742 #>>43924177 #
legobmw99 ◴[] No.43917143[source]
Based on the rest of your comment I suspect you're already familiar, but a decent candidate for "Rust with a GC" is OCaml, the language the first Rust compiler was written in.
replies(1): >>43917246 #
bunderbunder ◴[] No.43917246[source]
It's close. Perhaps there's an interesting conversation to be had about why OCaml hasn't taken over the world the way Rust has.

The toolchain might be a first candidate. Rust's toolchain feels so very modern, and OCaml's gives me flashbacks to late nights trying to get my homework done on the department's HP-UX server back in college.

replies(1): >>43919356 #
sn9 ◴[] No.43919356[source]
Can I interest you in some Moonbit?

https://www.moonbitlang.com/blog/first-announce

replies(1): >>43922513 #
1. int_19h ◴[] No.43922513[source]
With any new language, the first question one has to ask is, "what are the guarantees that it'll still be around in 5 years?".
replies(2): >>43926351 #>>43932405 #
2. bunderbunder ◴[] No.43926351[source]
For paid work, sure. But if it's for hobbies or even side hustles then I don't see any harm in prioritizing fun.
3. sn9 ◴[] No.43932405[source]
Always true, but they've made a remarkable amount of progress since the language was announced, and have some experienced people leading the project.