3 ms·
I've been doing more and more Elixir work, and one of the most important lessons I keep learning is to keep my 'actors' as simple as possible and put the compli
by mercer 8y ago
I've been doing more and more Elixir work, and one of the most important lessons I keep learning is to keep my 'actors' as simple as possible and put the complicated stuff in my 'bags of functions'. I generally try to treat my code as two completely separate layers: the code that does stuff, and the code that orchestrates/isolates all of it.
What I find fascinating is that, at least for me, using GenServers/Agents/Tasks has made this distinction much more obvious than it has been in other languages.
I've built horrifying systems that muddled things together, only to realize quite far in how much of a mess I made, but with my Elixir projects I usually realize what I've done pretty quickly, and I end up course-correcting earlier on.