3 ms·
> that's a mental model for programs that goes against how most people I know reason about code. But the mental model most of us have for reasoning about code
by jimbokun 2y ago
> that's a mental model for programs that goes against how most people I know reason about code.
But the mental model most of us have for reasoning about code in environments with concurrent execution is simply wrong.
So the Elixir model is more understandable, if you want a correct understanding of what your code will do when you run it.
- gr4vityWall 2y ago> the mental model most of us have for reasoning about code in environments with concurrent execution is simply wrong. Could you elaborate on that?
- jimbokun 2y agoIt is very difficult to write thread based code with no bugs.
- necovek 2y agoI don't think that's true: it's pretty easy, really (basically, adopt the message passing/directed-acyclic-graph structure in your threads). What is true is that it's too easy to write threads-based code with bugs, and therein lies the problem.