3 ms·
Try learning Rust, then you reach this point https://stackoverflow.com/questions/39558633/higher-rank-lifetimes-and-generics-not-playing-nicely https://stackov
by iopq 5y ago
Try learning Rust, then you reach this point
https://stackoverflow.com/questions/39558633/higher-rank-lifetimes-and-generics-not-playing-nicely https://stackoverflow.com/questions/39558633/higher-rank-lif...
I still don't understand what higher rank lifetime bound means and this affects whether I can write code that actually compiles
- lmm 5y agoWhen I was writing my comment I thought about Scala, where I was certainly learning useful new techniques 7 years into using the language, but that wasn't really about learning new parts of the language. I think Rust has picked an overly specific way to represent lifetimes, that makes them more of a special case than they should be. But maybe that distinction doesn't actually matter. (Higher rank lifetime bounds are like higher rank types, it might be easier to understand those first and then understand Rust's weird special case version of them afterwards)
- pornel 5y agoRust is in this weird place, because it needs to be palatable to C/C++ programmers. C has pointers and a vague notion of their lifetimes, but barely any type system to speak of. That's the lens through which Rust needs to present the problem.