Remix.run Logo
seanhunter 8 hours ago

Looks like 100% idiomatic normal OCaml to me.

unstruktured 8 hours ago | parent [-]

Technically you are right but too much mutation for my tastes and probably many other ocaml developers.

avsm 7 hours ago | parent [-]

(author here) The mutation is only for performance critical code. I'm first trying to match C/Rust performance in my code, and then transform it to more idiomatic functional code (which flambda2 in OxCaml can optimise).

It's too difficult right now to directly jump to the functional version since I don't understand the flambda2 compiler well enough to predict whta optimisations will work! OxCaml is stabilising more this year so that should get easier in time.