News for hackers. Stuff that matters.
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?

Re:Functional programming languages should be better at muta... by derdi on Tuesday July 30, 2024 @07:15PM (#41115043)
> Why not?

Because it doesn't. Doesn't mean it couldn't, if it tried hard enough. But it doesn't, as a statement of current fact.