10 ms·
> but by your definition every function that operates on sorted arrays and doesn't verify the input is sorted is inherently unsafe Are you claiming it’s not? v
by jsjohnst 4y ago
> but by your definition every function that operates on sorted arrays and doesn't verify the input is sorted is inherently unsafe
Are you claiming it’s not? verify all input should be the baseline to call something safe imho.
- turminal 4y agoSure, but that's not a meaningful definition of safety, because according to this definition writing a safe O(log n) binary search is impossible in every single mainstream language in existence.