<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div><blockquote type="cite" class="">"..*most* people don’t expect.." could you prove this please?</blockquote><div><br class=""></div><div>I should have written “most people I know” or “the people I work with".</div><div><br class=""></div><blockquote type="cite" class="">Especially if they know a little of C language or other language that don't allow to use wrong indexes for arrays.<br class=""></blockquote><div><br class=""></div><div>Maybe that’s the point: They don’t. And it is my understanding that they shouldn’t need to; that Swift should be for everyone and a great language to get into programming.</div><br class=""><blockquote type="cite" class=""><div class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">This behavior described in help/documentation/tutorial for Swift, this is how Swift works with arrays.</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""></div></blockquote><div><br class=""></div><div>Yes, and I agree with you that people should read the documentation.</div><div>However, the question is: Is this behavior optimal? Is a runtime error really the best way to handle this for the most common use case of arrays?</div><div>But the definition of “most common use case” varies wildly. Hence my idea to have separate classes for separate needs.</div><div><br class=""></div><div>In the end, what’s most important to me is to be able to have a consistent mental model. Something simple like: If I’m using classes called “unsafe” or exclamation marks, my app might experience runtime errors. That’s something the students I’ve taught could understand easily.</div><div><br class=""></div><div>- Andreas</div></div></body></html>