Hacker News new | past | comments | ask | show | jobs | submit login
The Borrow Checker Within (smallcultfollowing.com)
23 points by todsacerdoti 10 months ago | hide | past | favorite | 3 comments



I'm wondering why the lifetimes as described in steps 2 and 3 need to be so explicit. Why shouldn't the borrow checker be able to infer them?


It probably could, but then you'd get incredibly confusing error messages if you got it wrong (and potentially when modifying code in a completely different part of the code base).


Probably for the sake of explanation, to show how the new "lifetimes" and types would work from a user's perspective, even if they could be inferred in practice.




Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: