2014

Rust is an in-development0 systems
programming language with a strong focus on no-overhead memory
safety. This is achieved through a powerful type system (with
similarities to Haskell), and careful tracking of ownership and
pointers, guaranteeing safety. However, this is too restrictive for a
low-level systems language, an escape hatch is occasionally
required. Enter the unsafe keyword.

In my voyages around the internet, I came across a pair of
blog posts which compare the implementation of a
k-nearest neighbour (k-NN) classifier in F# and OCaml. I couldn’t
resist writing the code into Rust to see how it fared.