The one thing I never seem to get into my head are lifetime parameters. The syntax is just so strange and it seems hard to find examples for specific cases anywhere. It feels like fighting the borrow checker but without even knowing what it wants.
Agreed, lifetimes are more difficult and I figured perhaps warrants an article in itself. I certainly haven't tried to cover them here, would have been too much. In principal they're not so bad but in practice can be a different experience, I still struggle at times and have been known to use other techniques in order to avoid having to (which is clearly not the right way of doing things).
I'll try and put together a lifetimes article at some point as well. I'd be curious to have an example of the kind of thing you do struggle with if you'd be so kind/have one to hand.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
The one thing I never seem to get into my head are lifetime parameters. The syntax is just so strange and it seems hard to find examples for specific cases anywhere. It feels like fighting the borrow checker but without even knowing what it wants.
Agreed, lifetimes are more difficult and I figured perhaps warrants an article in itself. I certainly haven't tried to cover them here, would have been too much. In principal they're not so bad but in practice can be a different experience, I still struggle at times and have been known to use other techniques in order to avoid having to (which is clearly not the right way of doing things).
I'll try and put together a lifetimes article at some point as well. I'd be curious to have an example of the kind of thing you do struggle with if you'd be so kind/have one to hand.