简体   繁体   中英

functional concurrency

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?

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)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM