Rust and Go department directories

Continuing my journey with Rust, I recently completed a suggested exercise from “The Book": Using a hash map and vectors, create a text interface to allow a user to add employee names to a department in a company. For example, “Add Sally to Engineering” or “Add Amir to Sales.” Then let the user retrieve a list of all people in a department or all people in the company by department, sorted alphabetically. [Read More]

Rust match guards and exhaustive conditions

I have started learning the Rust language, to see what people find attractive about it, and to understand cases where I may want to use it. A post on correctness with types by Amos (fasterthanlime) seemed to offer some tantalising benefits. It reminded me of some of the struggles I had with Go when I first started learning it years ago – things like my inability to control exactly how my types are used to prevent programmers from making mistakes, and my inabilty to create types that could do certain things that the core language types can do (e. [Read More]