Skip to main content

Because with a few exceptions (Haskell) there is no way that the compiler can unwrap a loop. The problem is that each iteration threwthrough the loop can modify global state. So doing it in a different order may cause things to break. In haskell you can count on a function being pure, which is to say it does not read or change global state, so they can be executed in any order.

The real issue is that with a few exceptions how to do concurrency well is still very much an open problem. The Erlang and Haskell communities seem to be doing pretty well but its still a long way to go before we really understand how to program a N-core system for large N.

Because with a few exceptions (Haskell) there is no way that the compiler can unwrap a loop. The problem is that each iteration threw the loop can modify global state. So doing it in a different order may cause things to break. In haskell you can count on a function being pure, which is to say it does not read or change global state, so they can be executed in any order.

The real issue is that with a few exceptions how to do concurrency well is still very much an open problem. The Erlang and Haskell communities seem to be doing pretty well but its still a long way to go before we really understand how to program a N-core system for large N.

Because with a few exceptions (Haskell) there is no way that the compiler can unwrap a loop. The problem is that each iteration through the loop can modify global state. So doing it in a different order may cause things to break. In haskell you can count on a function being pure, which is to say it does not read or change global state, so they can be executed in any order.

The real issue is that with a few exceptions how to do concurrency well is still very much an open problem. The Erlang and Haskell communities seem to be doing pretty well but its still a long way to go before we really understand how to program a N-core system for large N.

Source Link
Zachary K
  • 10.4k
  • 2
  • 39
  • 55

Because with a few exceptions (Haskell) there is no way that the compiler can unwrap a loop. The problem is that each iteration threw the loop can modify global state. So doing it in a different order may cause things to break. In haskell you can count on a function being pure, which is to say it does not read or change global state, so they can be executed in any order.

The real issue is that with a few exceptions how to do concurrency well is still very much an open problem. The Erlang and Haskell communities seem to be doing pretty well but its still a long way to go before we really understand how to program a N-core system for large N.