Hacker News new | past | comments | ask | show | jobs | submit login

Specifying the heuristics would actually impede future implementations. Even if they would be willing to engage in spending more computational effort on proving that a controversial block of code is type-safe. And it's always possible that a smart PhD student comes up with a better heuristics for certain kinds of programs.

Implementations accepting different sets of inputs is certainly annoying, but acceptable as long as they are erring on the side of caution. We definitely don't want code to compile which is actually not type-safe. At a quick glance, the PR can be understood as automating a workaround that programmers had to do by themselves before.

> This PR (similarly, and building on top of #104765) allows RPITs and async fns to untangle their lifetime bounds to figure out the set of lifetimes that actually get caputed instead of falling back to a larger one or even 'static. For most cases it was was already possible for users to manually reorder their lifetimes to make their code compile, this PR just makes that automatic, as the order of generic params and bounds should not matter.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: