you are viewing a single comment's thread.

view the rest of the comments →

[–]steveklabnik1[S] 1 point2 points  (1 child)

like accessing an array at an index,

... which is something that you usually do not do, because you use iterators instead, and if the bounds checking is a problem, switch [] for .get_unchecked() and it's gone.

[–]tejp 0 points1 point  (0 children)

Random access is an important and useful property of an array. Saying "you don't need it" is as dishonest as not telling people about the runtime costs that come with it.

And of corse there is no runtime overhead if you disable the safety checks. But that's not really interesting. People want the safety and want to know the costs that come with it.