Closed nhz2 closed 8 months ago
This comes from
julia> promote(UInt(1), Int(-1))
ERROR: InexactError: check_top_bit(UInt64, -1)
I see in your example that Julia sidesteps this promotion in comparisons. It is unclear to me that this is an entirely safe practice. What is your opinion?
Yes, there may need to be a special case for comparisons, but I haven't thought about how to do that safely. Are all of the comparisons using base Integer types already overflow safe? If so maybe those base operations can be used as is.
I certainly hope so :). That was an initial design specification.