views:

48

answers:

1

Hi, when there is some list of advantages of functional languages, there is usually mentioned that it makes concurrency easier because there is not any variables which are subject of change. But, as my assembler-school-lessons-memory knows, there are registers in cpu and memory, that are both mutable. So when the high-level functional code is compiled into some low-lever code, it becomes imperative and mutable. So I'm not understanding what is the advantage of using functional languages in concurrency. Can anyone explain this?

+2  A: 

It's programmers, not computers, that have a hard time with concurrency. So saying that immutability makes it easier means on humans, not on computers.

(I include compiler writing as a human activity)

vlabrecque