News for hackers. Stuff that matters.
Re:Bugs that the Rust compiler catches for you by native_samples on Saturday May 07, 2022 @07:30AM (#31293701)
Yes, but the problem is that very often a programmer "knows" an index operation can't fail because they haven't thought of a case where it is a different size, or code gets refactored and assumptions are invalidated, etc.

The panic mentality comes from people who have spent most of their life writing C++, in which if anything goes wrong like an out of bounds index, memory might be corrupted in arbitrary ways, and in which you don't have a GC to clean up after you. Writing exception safe code is much easier in type safe GCd languages, and many programming errors end up being recoverable.

There are no comments on this comment yet.