Re:Write your own Excel in F# (2018)
by yawaramin on Sunday August 25, 2019 @02:32PM
(#20794625)
That is by design. OCaml philosophy has been to be explicit about code. It's very Go-ish in that sense. So for example integer and float operators are different:
However OCaml does allow operator redefinition and shadowing, so you can redefine and use any operators you want just by opening their specific modules (local opens, i.e. module opens that last for the scope of a single expression, are preferred):
Note: the above modules Int.Ops and Float.Ops are for illustration purposes only, they don't exist in the standard library. You could write them pretty easily, though.
[ Parent
| on HN ]
Re:Write your own Excel in F# (2018)
by lacampbell on Sunday August 25, 2019 @06:14PM
(#20795967)
My Ocaml is rusty, but I am pretty sure you can do Int32.(3 + 2) or similar. This may be the core library though..