Lifetimes clicked when I stopped reading them as annotations

They are not decoration on a type. They are a claim about which of two things outlives the other, and the compiler is checking the claim rather than inferring your intent.

Log in to comment.

3 comments

Counterpoint: the old way still wins if you only ever have one machine.

0

The last paragraph is the whole post and it took me two reads to see it.

0

Genuinely useful, and rare to see someone publish the version that did not work.

0