Oct. 10th, Thursday - 10:00 - 10:30
Through the Fire and the Flames
Why does my thing need to be Send
, and why isn’t it? Why does this function have ten lines of where
clauses; what are they all for? What do you mean foo
doesn’t live long enough? Why is this async code just using a single CPU core? These are questions most of us have muttered under our breath after too much time staring at a screen of Rust code that we just can’t quite get right. Maybe we do some searching or blindly move things around and manage to find our way around our particular issue, but lo’ and behold another very similar one crops up a short time later. These kinds of recurring stumbling blocks make us doubt ourselves, hate the language, and ultimately limit our ability to actually getting things done!
The reality is that Rust is a language with some inherent complexity (and associated features) that isn’t present in many other common languages. And these questions, and others like them, tend to stem from a lack knowledge of the underlying principles and mechanisms. Often, even a surface-level understanding of these deeper concepts will allow you to self-diagnose or entirely avoid 80% of the challenging cases.