3 ms·
> As an Erlang programmer I often claim that “You can’t pick parts of Erlang and then claim you have the same functionality. It all comes together as a whole”.
by brickcap 13y ago
> As an Erlang programmer I often claim that “You can’t pick parts of Erlang and then claim you have the same functionality. It all comes together as a whole”.
I am guilty of this. I am relatively new to erlang programming and I have skipped on some of the features that make the language great. For instance I have neglected learning both supervision and hot code reloading.
- banachtarski 13y agoWell you're relatively new :). It takes time to absorb an entire language's ecosystem. As long as you take it upon yourself to acquaint yourself with those features, things will be fine. The biggest thing to get on your initial survey should be minimal awareness so you know that that feature exists when you encounter the problem it was originally built to solve. Supervision though, is fundamental to OTP and Erlang. It's certainly easy to learn so I would consider that a low hanging fruit for you. Hot code reloading is a consequence of the continuation passing style that is prevalent in every Erlang process and easy to understand too (although employing it in production can be a bit trickier).
- lostcolony 13y agoHot code reloading I'd personally grant you as an exception; it's a maintenance tool, not a development tool, and you can largely ignore it until you want it, if you're adhering to OTP principles. Ignoring supervision, however, is...not wise, if you have -any- sort of reliability considerations (even ones as weak as "I'd prefer it to remain up"; if it's just a one off thing that you'll manually execute again if it fails, meh, fine). Supervision is really, really easy to use, at least for the base use case (creating a good hierarchy, so that processes restart the other processes that should be restarted, is an architectural consideration that can be a bit hairy), and it's truly heartening to grep a log for something you've been running a while, find crashes that indicate issues you want to fix (even simple stuff, like sanitizing inputs), but the system is still running as though nothing happened.
- brickcap 13y ago@lostcolony @banachtarski thanks guys. I will start with supervision first then. See if I can make use of it in some of my existing code.