3 ms·
Erlang processes have state and you interact with them by sending them messages. You can do OO if you want :P
by sjtgraham 11y ago
Erlang processes have state and you interact with them by sending them messages. You can do OO if you want :P
- dpeck 11y agoOddly enough you can do OO with Erlang/Elixir in a more pure/better (to me) way than you can with more traditional OO languages.
- Havvy 11y agoThat's because the core of OO (message passing to opaque things) is really all you can do if you have a PID. In other more-traditional object-oriented languages, they usually have defaults that let you do more than just send messages - such as mutate the internal state directly in ways that the object cannot detect.