logoalt Hacker News

saagarjha • today at 7:18 AM • 1 reply • view on HN

> Like indexing a vector panicking instead of returning a Some(T) in case the index is out of bounds.

If you are doing this then you've made a mistake in your code. Rust is consistent in catching these early.


Replies

uecker • today at 7:42 AM

There is also the idea that the language is so good because such things are caught at compile time via the type system. (But this is generally not done for the same reason it is not done in C.)

➕ show 1 reply