* 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++
I 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?
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!
The last time I checked, it was bootstrapped in OCaml. When I met Graydon several years ago (brilliant dude, PS), he was quite intrigued by OCaml, and strongly recommended I check it out. If ML had any influence at all, it uses variant types instead. About time more languages use them!
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.
Yes, it does have variant types and pattern matching, and an option type in the standard library, just like ML.
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.
>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.
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.
* 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++