4 ms·
> Why else would it be done that way? My guess would be ease of maintenance. OCaml has a small team of people working on it that are already bringing improveme
by Zababa 4y ago
> Why else would it be done that way?
My guess would be ease of maintenance. OCaml has a small team of people working on it that are already bringing improvements to the language that are multi year projects (multicore recently, modular implicits may be next and will take a long time too).
On the other hand, from what I understand, they also added to the compiler something to solve this problem for every class of problem that looks like this: https://v2.ocaml.org/manual/tail_mod_cons.html https://v2.ocaml.org/manual/tail_mod_cons.html.
That leaves the question: why not fix the stdlib List.map while waiting for the tail modulo constructor? I honestly don't know. My guess would be that it was easy for everyone that wanted to replace it to either do it or use an array, but that's just a guess.