> > True, but on the other hand, you'd never call array[i] with i out of > array bound (it would be a bug, and throwing an exception via the use > of at(i) is no better than "undefined behaviour"
that will also lead to a crash in the end). Wrong. See Heartbleed. It depends on if the page behind the last element is valid and how you use the memory. That's why it is undefined. Because no one can say. The exception at least would have terminated the buggy code and not sent private sessions keys to someone else. It's buggy no matter what, agreed to that. But at at least in one case it goes down right away without happily processing whatever data first. The fact that array[i] doesn't check the upper > bound also makes it faster than array.at(i): competent programmers who > do check for bounds where actually needed will therefore prefer > array[i] to array.at(i), esspecially when used in a loop ! Agreed. Nicky
_______________________________________________ Policies and (un)subscribe information available here: http://wiki.secondlife.com/wiki/OpenSource-Dev Please read the policies before posting to keep unmoderated posting privileges