one of my darkest fears is that specialization might never be sound because of lifetime nonparametricity
-
-
if it comes down to it that specialization and lifetime-nonparametric impls are fundamentally incompatible, I know that we got the bad side of that deal :-( Specialization is way more useful than `impl T for &'static str`
-
We couldn't write the Rust compiler with safe types without `impl<'tcx> Foo<'tcx> for Ty<'tcx>`. Specialization is useful, but typically for optimizations, which you don't need to write APIs. Writing a lifetime more than once in an impl is essential for APIs w/ lifetimes.
-
I admit I've never architected code with things like Rust's 'tcx, 'gcx, but I have needed specialization in API design *constantly*
-
I mean, you can even generalize to e.g. `impl<T> From<T> for T` and it's the same thing when you plug in some `T` that happens to contain lifetimes.
-
Ugh ok that one sucks
-
I guess what I’m really saying is if I were designing a language without lifetimes I’d do type classes w orphan rules & specialization in a heart beat
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.