3 ms·
Lifetimes do not influence code generation (besides potential specialization on 'static, which I'm not sure if it's a thing). But besides that the amount work
by dathinab 6y ago
Lifetimes do not influence code generation (besides potential specialization on 'static, which I'm not sure if it's a thing).
But besides that the amount work is indeed very close by each other. Which is why there is currently no plan to first have lifetime only GATs stable as far as I know.
- steveklabnik 6y agoYou're not wrong that they don't influence codegen, but I don't know why you're bringing that up. I don't see the connection. You cannot specialize on lifetimes, it is not sound.
- dathinab 6y agoBecause to have lifetime only GATs you need to change the syntax and liftime checker but once you checked the type you can treat it ignoring lifetimes and in turn ignoring the GAT aspect. But then if you did so you probably already implemented most/all of the code to typecheck non lifetime GATs and then doing the rest proper is probably not to hard either and might be not harder then doing liftime only GATs. > You cannot specialize on lifetimes, it is not sound. Good to know, given that specialization was stuck in nightly in the last years I didn't use it and in turn didn't look to much into it.