| Hey another article at YC frontpage about saying "DO NOT MESS WITH STATE" to scale; "Shared-memory multithreading really isn’t the future, we thought, and notably absent from all of my prior work was fixing this problem." I'm thinking about.. Immutability is the way to scale complex systems? Every system can be implemented as immutable by definition? We need to look to build new data structures - like Tries - to be Immutable-friendly? When Immutability doesn't worth it? |
You can mathematically try to hide that however you want, but somewhere deep in your language runtime stack will be a shared-memory concurrent mutable algorithm, be it a lock, queue, or otherwise.
The alternative is to ditch shared memory entirely and use e.g. hardware IPC to manage contention. Tilera tried that, they had 64-core processors with a hardware IPC mesh and incoherent cache. But last I checked they switched focus to coherent shared-memory concurrency. Not sure what the driver for the change was but it's telling.
EDIT: Not to mention that half the article focused on promise-style concurrency, which has nothing to do with shared memory or even multicore. Immutability does nothing to address that I/O exists and has latency, and that people try to hide it in frankly bizarre ways. (Really… not pumping the event loop to avoid deadlock? That's a design issue, you should be using queues instead of mutexes and eliminate cycles if you find you have that problem.)