Re:Functional programming languages should be better at muta...
by lmm on Tuesday July 30, 2024 @06:06PM
(#41114586)
> The OCaml compiler, great as it is, won't turn linked list source code into array machine code.
Why not? If the compiler can see that you have a short-lived local linked list and are using it in a way for which an array would be faster, why would it not do the same thing that an array would do?
Why not? If the compiler can see that you have a short-lived local linked list and are using it in a way for which an array would be faster, why would it not do the same thing that an array would do?