[Haskell-cafe] Let's fight Int, Pt. 2
Henning Thielemann
lemming at henning-thielemann.de
Sun Mar 14 21:10:59 UTC 2021
On Sun, 14 Mar 2021, Johannes Waldmann wrote:
> A historical precedent is set by Ada
> http://archive.adaic.com/standards/83lrm/html/lrm-03-05.html#3.5.4
> "The exception NUMERIC_ERROR is raised by the execution of an operation
> ... that cannot deliver the correct result"
Even in C, 'int' has no wrap-around semantics. Chris Lattner, creator of
LLVM, blogs about how the LLVM optimizer makes use of that fact:
https://blog.llvm.org/2011/05/what-every-c-programmer-should-know.html
I guess, if Haskeller's use the LLVM backend and assume wrap-around
semantics they will run into the same trouble that Chris describes in his
blog posts.
More information about the Haskell-Cafe
mailing list