A map can be auto-parallelised.
A loop cannot.
It seems to me that for a language aimed at exploiting concurrent features, easy wins for parallelisation would be a feature.
A map can be auto-parallelised.
A loop cannot.
It seems to me that for a language aimed at exploiting concurrent features, easy wins for parallelisation would be a feature.
(Note that Servo has been using this type system feature for a while now to prevent data races in our massively parallel CSS layout code.)
Arrg, you have me excited now!
Going to search for it, but I'd still like to hear your response.
Same reason why even though mergesort is fairly trivially parallelizable there's basically no stdlib running parallel mergesorts by default: you need huge collections before you recoup the synchronization overhead.
My personal brand of bigotry is relational databases, so I am accustomed to thinking of sorted / ordered behaviour as the special case. Thinking in sets is very powerful.
It doesn't have to be either/or. Sometimes you need a loop. But it would be nice to have mapping too.