Hacker News new | ask | show | jobs
by the8472 1611 days ago
Since this is about array indexing, if you do slice.iter.for_each() instead of for-in, while-let or manual indexing then it already uses unchecked access under the hood today because internal iteration can use a counted loop and knows it doesn't need those bounds checks.
1 comments

That’s discussed in the slices section of the article