Showing posts from August, 2018

Rust, week 2...

The continued, albeit slow, adventures of someone who's been coding for 37 years and is now learning Rust... Things I like about Rust, pt2... std::option::Option - no more Null... force error check at point of creation Inbuilt testing framework RustFmt - code formatting ! Everything is on Github... and I mean everything... fantastic ! Safety is not sacrificed for simplicity. Yes, Rust is a complex language, but that's because decisions have been made which puts safety and control first rather than convenience. The team provide editor integration plugins... including the mighty VIM ! Things I don't like about Rust Opening curly brackets on the right... argh ! I know it's just convention, but argh !  There's something quite exciting about the Rust community... the deeper I delve into the language and how the project is organised the more excited I get. One major problem with older languages like C and C++ is that the ecosystem around how you develop sof

Rust, week 1.

I've started looking at Rust again. I had a quick try of rust about 18 months ago when I was looking at modern alternatives to C++. At that time I learned a bit of Rust and also some Go. Both languages impressed me but to be honest I liked the feel of Go more... mainly because it was simpler to learn. Time has passed and my mind has wondered back to Rust. This page is a scrap book of thoughts about Rust during my first week back. Things I like about Rust... Built-in a build system (cargo) Immutable by default Explicit data ownership semantics Built-in documentation about the language and compiler errors Sensible type inference External module dependency versioning makes sense No implicit bool conversion Descriptive error reporting Tuples ! Things I'm not sure about... note I'm not saying these things are bad... just that I'm unconvinced at this point Allowing variable type changes via shadowing Progress reading 'The Rust Book' - 6.1 Definin