Re:A small British firm shows that software bugs aren't inev...
by andrewmu on Thursday October 22, 2015 @06:13AM
(#10431390)
Java only allows signed 32-bit integers as array indices. It 's a compile time error to access an array with a long index (http://docs.oracle.com/javase/specs/jls/se8/html/jls-10.html...).
Re:A small British firm shows that software bugs aren't inev...
by Alphasite_ on Thursday October 22, 2015 @03:47PM
(#10434548)
Not every language masks it, Swift certainly doesn't.
It would manifest itself with 32-bit integer indexes and with arrays of greater than 2^30 elements. So phooey. You can't even fit that many array elements into a 32-bit address space. And if you're in a 64-bit address space, you should be using 64-bit indexes.
Whine: way back in the 1960s, the IBM S/360 threw a fixed-point overflow exception (okay, to be pedantic, they called it a "program interruption", but it's the same idea) when you did that. Sadly, the Fortran compiler of the day masked it. And this same philosophy has carried over to today. About 99 times out of 100, fixed point overflow is bad, why is it being masked off?