== Quote from Andrei Alexandrescu ([EMAIL PROTECTED])'s article > (You may want to check your system's date, unless of course you traveled > in time.) > Russell Lewis wrote: > > I'm of the opinion that we should make mixed-sign operations a > > compile-time error. I know that it would be annoying in some > > situations, but IMHO it gives you clearer, more reliable code. > The problem is, it's much more annoying than one might imagine. Even > array.length - 1 is up for scrutiny. Technically, even array.length + 1 > is a problem because 1 is really a signed int. We could provide > exceptions for constants, but exceptions are generally not solving the > core issue.
Perhaps not, but the fact that constants are signed integers has been mentioned as a problem before. Would making these polysemous values help at all? That seems to be what your proposal is effectively trying to do anyway. Sean
