4 ms·
It might be too soon to ask, but what distinguishes Rust from Google's Go or the D programming language? It seems to me that we've got three programming langua
by quanticle 16y ago
It might be too soon to ask, but what distinguishes Rust from Google's Go or the D programming language? It seems to me that we've got three programming languages competing for the same niche.
- daeken 16y agoNot a whole lot, conceptually, it seems. The syntax feels very Nemerle-like to me, though, which is nice. Definitely something to play around with, if nothing else.
- hamilton 16y agoHaving seen early versions of Rust (I work at Mozilla) I can tell you that the syntax is the last thing they're even considering (though that may have changed over the past few months). Seems like Graydon wants to get the guts right first.
- quanticle 16y agoThat gets back to my question. What are Rust's advantages over Go or D?
- Semiapies 16y agoNot entirely sure what distinguishes them, but I'd rather have some competition in the niche than avoid defaulting to the first language that addresses the niche.
- neilk 16y agoFrom https://github.com/graydon/rust/wiki/language-faq https://github.com/graydon/rust/wiki/language-faq : *Have you seen this Google language, Go? How does Rust compare?* Yes. Rust development was several years underway before Go launched, no direct inspiration. Though Pike’s previous languages in the Go family (Newsqueak, Alef, Limbo) were influential. Go adopted semantics (safety and memory model) that are quite unsatisfactory. - Shared mutable state. - Global GC. - Null pointers. - No RAII or destructors. - No type-parametric user code. There are a number of other fine coroutine / actor languages in development presently. It’s an area of focus across the PL community.
- quanticle 16y agoThanks for that. It wasn't clear from the linked article that Rust was started before Go. The overall impression that I got from TFA was that Rust is another instance of the garbage-collected system language fad.
- ramchip 16y agoWhat are the other instances? Besides Go, I don't recall many languages that fit the bill. There's D, but it's not very new and certainly not a fad language.
- steveklabnik 16y agoAnd it's only garbage collected if you want it to be. (My friends are making an exokernel in D)
- konad 16y agoI think the fact that Rust is older and yet Go has 1000s of active programmers is indicative of something. "Ship early, ship often" springs to mind. The Plan9 community has been working like that for years, almost every day an updated version is available (the distro cdrom is rebuilt every night) with bug fixes / improvements / new stuff.
- deleted 16y ago[deleted]
- effn 16y agoRust is not very functional at all. E.g. no lambda, no closures (yet).
- deleted 16y ago[deleted]
- effn 16y agoCompared to Go: * Rust does not have NULL!! * Rust has parametric polymorphism. * Rust has more predictable memory/cpu usage thanks to forgoing global GC for a novel memory management model based on stack allocation/RAII, immutability, isolated processes and reference counting. * Rust has a very Erlang-like model of handling failures. * Rust has typestate, which is an easy to use way of proving properties about your program statically, or check them dynamically via assertion. * Rust has no shared mutable state. Those are facts. My personal, more subjective, opinion is that Rust is a lot better thought out than either D or Go. If this niche is too crowded, I'd rather see them go and Rust win. :) But given that Rust lacks shared global GC, I guess you could say it's closer to C++
- supersillyus 16y agoI think Rust is very interesting and quite exciting, but it's hard to evaluate in relation to other languages (for me, at least) because it is really really young. I've never seen a useful program written in Rust. All of the features sound really good in theory, but I've never used a similar language, so I don't have a sense for how these features work in practice. Actually, anybody have a link to some non-trivial Rust code?
- effn 16y agoThe self hosted Rust compiler is probably the largest piece of Rust code right now: https://github.com/graydon/rust/tree/master/src/comp/ https://github.com/graydon/rust/tree/master/src/comp/
- supersillyus 16y agoAwesome. Thanks for the link. Didn't realize that existed.
- burgerbrain 16y ago> * Rust does not have NULL!! That hardly strikes me as a feature. Null pointers simplify a lot of error-checking. Don't know if what you got back was valid? As easy as checking to see if it's zero!