Built-in binary search for sorted collections

That’s an interesting question. It’s not easily fixable, since length would have to be changed to return either a Int128 or longer, or a BigInt in this case, making it type unstable or breaking. The problem comes from the fact that julia does not use a “mathematical” integer for literals, lengths and sizes, like some languages do (cryptol springs to mind), but an ordinary bit integer.