4 ms·
The latter. The virtues of Elixir is that it is a functional language with immutable data structures, and that it does not support object oriented programming (
by erokar 11y ago
The latter. The virtues of Elixir is that it is a functional language with immutable data structures, and that it does not support object oriented programming (which I consider a feature).
- sjtgraham 11y agoErlang 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.