*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.The other points seem pretty dead-on.. Rust seems to prioritize safety over simplicity, which is probably a good thing.
* 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++
Actually, anybody have a link to some non-trivial Rust code?
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!
Rather than, "oh crap! every single variable could potentially be null at any time!", the few functions that can be null make you check for None / Some 'a, and that's it, no tedious null checks ever again. "Null pointers simplify a lot of error-checking.", my ass.
Contrary to ML, it doesn't require variables to be initialized when declared. The typestate system checks (statically) that they are not referenced before initialized.
What's the point, then?
Look deeper, there is a rich world of Programming Language history and research linked from Rust's FAQ. Don't cling to your Java or C/C++ null pointers.