Hacker News new | ask | show | jobs
by hnedeotes 1797 days ago
> Erlang has a simple memory model that cannot do joint parallel tasks.

What do you mean?

1 comments

You have to copy memory before sharing it between threads.

You cannot do atomic memory sharing between threads = threads cannot work on the same task at the "same" time efficiently.

That's actually much a feature. Many problems can still be done quite efficiently, for instance stream parsing a file you can have each N newlines being sent to different processes, and the same with many other problems that can be sliced, traversing nested collections, fetching batches of records from stores, etc.

Sometimes you can also reformulate the problem, but yes not all problems fit.

I would add though that whenever you want to write orchestration around that parallel work it's much easier in erlang than the alternatives.