Custom Search

Wednesday, May 11, 2016

A first look at Rust

What is Rust?

Rust is one of the crop of system languages that target roughly the same space as C: running on bare metal, system utilities and libraries, and applications. Like most of them, it incorporates features from the last half century of language research - modern macros, algebraic data types, type inference, user-controlled polymorphism, variable sized arrays, and some degree of inheritance. I think it made a nice set of choices, but that's honestly more a matter of taste than anything else. I'll look at those in some detail, and explain why you'd want to learn Rust.

What sets Rust apart from other such languages is that the compiler also keeps track what code can read and write an object, which it refers to as the lifetime of the object. It uses that to prevent you from creating multiple references that can change an object. This changes how you program in a number of ways.