Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I wrote a blog post about this. https://steveklabnik.com/writing/rusts-golden-rule

I did not mention lifetimes, but the principle is the exact same: the lifetime annotations are an API promise, and so inferring them means that a change in the body of the function would change the promise, breaking other code.



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

Search: