Hacker News new | ask | show | jobs
by kasey_junk 4498 days ago
I don't agree even with the sentiment of the original post, but there is an argument that while you can't get rid of array indexing bugs with a type checker (contracts might help here) you can design your collection types such that things like indexing above or below an array are compile time caught, as is indexing into the "wrong" array location.

Whether it is worth the trouble to do this in the type system probably depends on how good your language's type system is and how expensive array indexing bugs are to catch/fix.