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.

➡️ Stable 0.6x Programming Languages
4,155
Comments
17
Years Active
5
Top Authors
#3231
Topic ID

Activity Over Time

2010
3
2011
4
2012
38
2013
59
2014
175
2015
161
2016
292
2017
267
2018
231
2019
275
2020
427
2021
403
2022
457
2023
457
2024
390
2025
485
2026
31

Keywords

e.g ARM doc.rust FP UI never.html OO lang.org i.e microsoft.com rust type types languages ocaml syntax haskell void language fluent

Sample Comments

M2Ys4U Aug 12, 2020 View on HN

Well for one Rust has a very nice type system

cess11 May 21, 2025 View on HN

What does Rust have that other languages with these properties don't?

Ar-Curunir Sep 18, 2017 View on HN

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.

MaxBarraclough Jul 9, 2020 View on HN

You're referring to Rust's static type system. What do you make of TypeScript?

bloppe Oct 27, 2024 View on HN

Very curious to know an example of what's ok in Rust but not in C

haimez May 14, 2020 View on HN

Rust is statically typed, so it’s not quite the same effect

chris_nielsen Sep 11, 2023 View on HN

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?

insulanian Nov 22, 2018 View on HN

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?

mintplant May 21, 2019 View on HN

Rust's approach is very much not "duck typing".

cryptonector Jan 13, 2019 View on HN

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 :)