Battleship... written in Rust

Rust … as a Newcomer

What a neat language, Rust is. It’s a pretty low-level language that reminds me of dipping down to [C]( where you need to be very specific on data types, references, and where all the free-form magic you get with something like Python does not exist.

What you get with all the pain, though, is compile time safety, a reasonable expectation you’ll be safe a run-time, and performance that blows most other languages away. The footwork you have to do with the typing system doesn’t seem that low-level, though! At frequent times, you’ll break out some features that will make you think you’re in a high-level language. And it even has good support for functional techniques that aid in cutting down alot of the verbosity in such a strict language.

Learning Rust

My first suggestion when trying to learn a language is write something. Anything, really. Sure, do some research on the language, read a few tutorials, but you need to actually write in the language to get a feel for it.

I’d highly recommend The Rust Book. This language guide is shepherded by themselves, so it’s usually thorough and gets updated with the language.

For me, I wrote some stuff here and there when I was following allong with the book. I immediately started thinking of something a bit more complex to get a better feel for the language. I figured, why not write a silly little game.

I picked Battleship.

Battleship… in Rust

You can check out my GitHub repo for the code and some words about how to play it.