2 ms·
> The examples in Elixir all looked more complicated for me to understand, generally, although I understand the value brought that model. The cognitive load see
by rkangel 2y ago
> The examples in Elixir all looked more complicated for me to understand, generally, although I understand the value brought that model. The cognitive load seemed fairly higher as well.
I can see that might be the case with simple examples, but with more complex systems I find the cognitive load to be much lower.
The Elixir/Erlang approach naturally results in code where you can do local reasoning - you can understand each bit of the code independently because they run in a decoupled way. You don't need to read 3 modules and synthesise them together in your head. Similarly the behaviour of one bit of code is much less likely to affect the behaviour of other code unexpectedly.
- gr4vityWall 2y agoQuestion: do you know any of such more complex systems which are Free Software, so that I could take a look? Sounds like it would be a fun learning experience.
- rkangel 2y agoI'd love to point you at some code from work but it's all closed source unfortunately. One example that gets used is https://github.com/hexpm/hex https://github.com/hexpm/hex which is the code behind the Elixir package management website. It's more a good example of a Phoenix app than it is general OTP stuff, but there are some GenServers in there.
- gr4vityWall 2y agoThank you, I'll check it out. :)