Rust Objectives Observation

It seems also other beginners run into this. That one seems to have be bitten by the difference between T and &mut T being camouflaged by type inference and runs into lifetime issues because of it.
I'm starting to see how this can be confusing people, especially since most dynamic languages let you write virtually the exact same code, and the garbage collector just magically solves it for you.

That's exactly my experience; I started lurking rust and rust-code long before I wrote it myself. When I started actually writing my own extremely basic exercises, I was really surprised how much compiler errors I was running into. Fortunately I'd also read enough community content to have learned that everyone seems to have that experience, and regarded it as my own personal trial-by-fire. It was very satisfying each time to solve the error by learning why it was happening, although I'l admit to random sprinkling of &, mut and prayers to Ferris too.

Exactly! I've said it before: Writing Rust may be harder than writing C, but debugging (large) C is way harder than writing large Rust.
Once a program starts exceeding one "mind-sized chunk" of complexity, where in C your brain may (just) have been able to keep track of all the pointer-juggling, then Rust's stricter guarantees start to really shine. I can't wait to experience that effect in a "legacy" codebase that has been written and maintained by a changing team 5 years before you even join the company.

In that context: I love that "unhelpful compiler warning" is considered an actual bug by the compiler team.

Hmm, interesting observation! Both for Rust and the other languages. I was personally expecting it to be high-performance server farms, but that arena has more competition, and you are definitely correct that IoT pairs even nicer to Rust's strengths.
Now that you mention it... I've seen the company particle, who make IoT chips like the Spark, Photon and Electron, explore Rust for exactly these reasons.
There also seem to be quite a few blogs on "how to write a kernel in Rust", and @japaric was being awesome in helping @rotschopf get up to speed in embedded development. I wouldn't be surprised if there's also a company behind there.

Edit: And why am I not surprised to learn that @japaric is also operating on the intersection of my two examples, by writing Rust firmware for the Photon.

2 Likes