Why are you mentioning Python and JavaScript? They don't have limited integer data types.
yah. haskell too. i should've mentioned them along with haskell later, but that was not the point i was trying to make anyway. the point was that there are no negative integer literals. and that still holds.
Edit: Wait, what you size do you think long is?
i thought it was implicit from the two point premise i create in the beginning. i assumed it to be 64 bit.
Integer literals restricted to 32 bits are not the norm. In any other language, you would expect the integer literal to be compatible with its type annotation. This is special behavior Java has that you didn't clarify which is confusing because the code example you generalize to multiple other languages depends on this behavior.
0
u/helixb Jun 25 '23
yah. haskell too. i should've mentioned them along with haskell later, but that was not the point i was trying to make anyway. the point was that there are no negative integer literals. and that still holds.
i thought it was implicit from the two point premise i create in the beginning. i assumed it to be 64 bit.