Why can I call .iter() on an immutable empty array?

"Bad person" is definitely too strong. Of late I've been talking about places with algorithmic invariants as being where dogmatically returning Option/Result can hurt more than it helps. That's not unlike what you said about "statically provable", but acknowledging that actually putting that proof machinery in the language may be impractical.

Related previous conversations:

Or, more generally, To panic or to Result - #4 by scottmcm

2 Likes