5 ms·
It does seem to depend highly on the context in which the array is used. Strictly defined algorithm with an off-by-one: bug. User-defined indexing as you say is
by jrrrp 1y ago
It does seem to depend highly on the context in which the array is used. Strictly defined algorithm with an off-by-one: bug. User-defined indexing as you say is a counter. I suppose it is hinging on arrays being used in less dynamic contexts where you're likely to know the length, so to save you from handling all the Nones. I think I'd prefer a parallel api that returns Option, so you don't need to duplicate the bounds checking.