News for hackers. Stuff that matters.
Re:Go: What We Got Right, What We Got Wrong by zozbot234 on Thursday January 04, 2024 @07:20PM (#38874086)
Early versions of Rust were a lot like Golang with some added OCaml flavor. Complete with general GC, green threading etc. They pivoted to current Rust with its focus on static borrowcheck and zero-overhead abstractions very late in the language's evolution (though still pre-1.0 obviously) because they weren't OK with the heavy runtime and cumbersome interop with C FFI. So there's that.
Re:Go: What We Got Right, What We Got Wrong by kibwen on Thursday January 04, 2024 @07:38PM (#38874226)
Both Rust and Go are descendants of Limbo, Pike's prior language, although while Limbo's DNA remains strong in Go it's much more diffuse in Rust.
Re:Go: What We Got Right, What We Got Wrong by sapiogram on Friday January 05, 2024 @08:09AM (#38878671)
While those influences are important to Rust's history, they were mostly removed from the language before 1.0, notably green threads and the focus on channels as a core concurrency primitive. Channels still exist as a library in stdlib, but they're infinitely buffered by default, and aren't widely used.
Re:Go: What We Got Right, What We Got Wrong by masklinn on Friday January 05, 2024 @04:46AM (#38877333)
> Complete with general GC, green threading etc.

AFAIK there was never "general GC". There was a GC'd smart pointer (@), and its implementation never got beyond refcounting, it was moved behind a feature gate (and a later-removed Gc library type) in 0.9 and removed in 0.10.

Ur-Rust was closer to an "applications" language for sure, and thus closer to Go's (possibly by virtue of being closer to OCaml), but it was always focused much more strongly on type safety and lifting constraints to types, as well as more interested in low-level concerns: unique pointers (~) and move semantics (if in a different form) were part of Rust 0.1.

That is what the community glommed onto, leading to "the pivot": there were applications language aplenty, but there was a real hunger for a type-heavy and memory-safe low level / systems programming language, and Rust had the bones of it.

Re:Go: What We Got Right, What We Got Wrong by tialaramex on Friday January 05, 2024 @06:42AM (#38878100)
> a real hunger for a type-heavy and memory-safe low level / systems programming language, and Rust had the bones of it.

I didn't know I wanted this, but yes, I did want this and when I got it I was much more enthusiastic than I'd ever been about languages like Python or Java.

I bounced off Go, it's not bad but it didn't do anything I cared about enough to push through all the usual annoyances of a new language, whereas Rust was extremely compelling by the time I looked into it (only a few years ago) and has only improved since.