Nice TWiki > Dev > CheckedIntegerArithmetic (r1.10 vs. r1.11) TWiki webs:
Dev | Doc | Main | TWiki | Sandbox
Dev . { Changes | Index | Search | Go }
 <<O>>  Difference Topic CheckedIntegerArithmetic (r1.11 - 30 Dec 2003 - BrianSlesinsky)
Added:
>
>

A cint type seems too low-level since it's tied to JVM details rather than the problem space. I think it would be more useful and more high-level to have checked integer types with a user-specified range. For example, integers in the range [1...100]. That way you find out earlier about incorrect values and the compiler can choose an int, long, or BigInteger? implementation as appropriate. Operations done with these integers would use intermediate values as large as necessary to prevent overflow and do the runtime check when assigning to a non-temporary. (Of course, it's more work for the compiler.) -- BrianSlesinsky - 30 Dec 2003


Topic CheckedIntegerArithmetic . { View | Diffs | r1.12 | > | r1.11 | > | r1.10 | More }
Revision r1.10 - 24 Dec 2003 - 17:39 GMT - IsaacGouy
Revision r1.11 - 30 Dec 2003 - 18:35 GMT - BrianSlesinsky
Copyright © 1999-2003 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback.