Rust Type System
Discussions center on Rust's type system, its strengths like static typing, ownership, and expressiveness, often comparing it to languages such as Haskell, OCaml, C++, C#, and TypeScript.
Activity Over Time
Top Contributors
Keywords
Sample Comments
Well for one Rust has a very nice type system
What does Rust have that other languages with these properties don't?
Just FYI, RUst is not an OOPy language. The type system is much cleaner and actually works to ensure things are guaranteed at compile-time.
You're referring to Rust's static type system. What do you make of TypeScript?
Very curious to know an example of what's ok in Rust but not in C
Rust is statically typed, so it’s not quite the same effect
Not trying to be cheeky, but why not c#? Has pts 2, 3 and 4. For pt 1, what in Rusts type system are you looking for?
Can someone familiar with both Rust and F# (or OCaml) type systems write few words about the expressiveness aspect of the language?What would I miss in Rust if coming from the F# background?
Rust's approach is very much not "duck typing".
Rust is becoming very popular. What is Rust though, if not a strict (i.e., non-lazy) Haskell with different syntax, linear types, and less polymorphism? I think a CS type who loves Haskell will be right at home with Rust. Or modern C++. Just as a CS type who loves Lisp will also be able to make the move to Rust or modern C++. Java, maybe not so much :)