▲ | thomasmg 13 hours ago | |
Many libraries throw an exception, panic, or silently swap the parameters at runtime. To detect this at compile time, you would need either min and max to be known at compile time, or a type system that supports value-dependent types. None of the popular language support this. (My language named 'Bau', which is not popular of course, support value-dependent types to avoid array-bound checks.) |