What finally made the borrow checker click for you?
Six months in and I still restructure code to make it happy rather than understanding why.
Six months in and I still restructure code to make it happy rather than understanding why.
Compile times got better once we split the workspace into more crates.
Saving this for later.
Ha, I thought I was the only one.
This is the most useful reply in the thread.
Async is fine for applications now. Libraries still have it harder.
Thinking in terms of ownership rather than lifetimes made it click for me.
Could you share a photo of how it turned out?
It clicked once I stopped thinking about lifetimes and started thinking about who owns what.
Write the data structures first, the code follows from them.
Thanks, this is exactly what I was looking for.
Ha, I thought I was the only one.
late-clover-96 wrote:
Ha, I thought I was the only one.
Strong disagree, but I appreciate the write-up.
Counterpoint: it depends a lot on how much time you have.
late-clover-96 wrote:
Ha, I thought I was the only one.
Could you share a photo of how it turned out?
misty-rowan-88 wrote:
Write the data structures first, the code follows from them.
Small correction: it was the other way around, but the point still stands.
Saving this for later.
woven-beech-64 wrote:
Saving this for later.
Strong disagree, but I appreciate the write-up.
The compiler errors are the best teacher. Read them all the way through.
Thanks, this is exactly what I was looking for.
Fewer incidents is worth slower onboarding, in my experience.
Clone more than you think you should while learning. Optimise later.
dusky-fern-70 wrote:
Clone more than you think you should while learning.
Agreed, and I'd add that it takes a while before it clicks.
I tried this last year and ended up somewhere completely different. Not worse, just different.
Agreed, and I'd add that it takes a while before it clicks.