News for hackers. Stuff that matters.
Re:Understanding Jane Street by Gene_Parmesan on Tuesday August 02, 2022 @03:45AM (#32316113)
Yes, it uses ML-style type inference, but that doesn't mean you are literally unable to annotate types, and the compiler is absolutely still doing type checking. I'm sure people like Jane Street annotate everything.

In addition, perhaps a small point relative to the first, but in Ocaml, the arithmetic operators perform no type inference; there's a separate operator for float-addition versus int-addition, and so on. This somewhat limits your exposure to potential automatic type conversions.

Re:Understanding Jane Street by mgaunard on Tuesday August 02, 2022 @04:00AM (#32316186)
That is not the idiomatic way to use OCaml, so I wouldn't assume they do that.
Re:Understanding Jane Street by SonOfLilit on Tuesday August 02, 2022 @06:55AM (#32317136)
At least in similar languages like Haskell, what you do is let the compiler infer types and then press an IDE key combination to write out those inferred types as part of your code so you would get an error if you ever accidentally change the types.
Re:Understanding Jane Street by LeonidasXIV on Tuesday August 02, 2022 @06:02AM (#32316873)
Writing `mli` files is pretty much idiomatic or at the very least, not unusual.
Re:Understanding Jane Street by mgaunard on Tuesday August 02, 2022 @09:51AM (#32318456)
Only for the public API boundary.