Integer and Float
32-bits, truncated when necessary. Reason provides the usual operations on them:
#Tips & Tricks
Float requires other operators:
/., etc. Like
0.5 +. 0.6.
There's no Float module in the current standard library. For JS compilation, see Js.Float.
"Why the heck can't I just use an overloaded
+ for both int and float?"
There's a lot of history to this, but one day we'll be able to. Let's hang in there =)
Additionally, floats are rather special in Reason/OCaml native. Check here if you're interested in learning some rather interesting optimizations!