2 ms·
> The biggest question I have about this: Is it really a good idea to make local actors and supervisor trees indistinguishable from remote ones? The erlang cod
by toast0 10y ago
> The biggest question I have about this: Is it really a good idea to make local actors and supervisor trees indistinguishable from remote ones?
The erlang code to send a message to a remote pid and a local pid is the same, but that doesn't make them indistinguishable; you can check if the pid is local or not in code. In my experience, I have some expectations of where the thing I'm messaging is going to be when I write the code, and I can act accordingly: better error handling when I expect to talk to a remote node since I can't be sure I'll be able to reach it; whereas if I expect to reach a local pid, I'm more likely to match against success and let it crash if something weird happened.