A quick tour of Rust’s Type System Part 1: Sum Types (a.k.a. Tagged Unions)
Rust is one of those hip new programming languages you might get tired of hearing about on the Hacker News, but talking with people who have heard of Rust but haven’t actually looked into it in depth, I feel like what Rust actually offers you as a programmer is often poorly communicated. The more I use Rust, the more I’ve come to discover that the single most important thing it offers, the part of the language that almost all of its other benefits fall out of, is its type system.
I’m embarking on a short series of blog posts which will explore Rust’s type system, and hopefully describe things in a beginner-friendly way such that you don’t need to know a whole lot about advanced type systems to understand what I’m talking about.
Before I go any further talking about type systems, let me make one thing clear: this is not a post for type system experts. If you’re a functional programmer...
Continue reading →