Syntax Surprises

I’m not sure it’s that big of a deal; in other places where an Int is expected, as long as there’s an exact integer representation, conversion is implicit and expected:

julia> struct Foo x::Int end

julia> Foo(2e9)
Foo(2000000000)

Float64s have a 52-bit mantissa (good for about 15 sigfigs), and Int64s have a maximum value of 2^{63}-1 \approx 9.2\times 10^{18}, so there’s a large practical range of overlap.

I’m not sure I understand the question. It would be of benefit every time you need a big integer (one common one being for i in 1:2e9).

It’s not a real suggestion, though, I just miss a convenient syntax for large Ints.

I’m mostly just pondering if your desire for a convenience syntax for large Ints, couldn’t be satisfied by a few implicit Float64Int conversions in the language.

for i=1:2e9 is a pretty good example of a place where it wouldn’t work though.

Maybe it would work, but it would be very nice, I fear.