4 ms·
Being an erlang programmer I am so used to programming for the correct case and not to check errors but let the process crash when you get an error or, rarely,
by rvirding 12y ago
Being an erlang programmer I am so used to programming for the correct case and not to check errors but let the process crash when you get an error or, rarely, use a try that I find this style of programming completely wrong. It is what we are trying to avoid. You will always miss cases.
- TheHydroImpulse 12y agoThere are many more areas where you simply cannot abort the process on any error that has been triggered. Erlang, being in the niche of network software, can get away with this because you can have mechanism that monitor the process and it's not the end of the world if one process goes down. Imagine if your Browser crashed every time it hit an error, like a network connection issue, writing to a file, etc...! That just wouldn't be tolerated by consumers of the software.
- fenollp 12y agoEh. The point is to not handle things you don't need to. There is of course a point in handling special cases (like the ones you cited). But compare Erlang's declarative & to-the-point style with Go's `…,err = …; err != nil` and you will quickly realise how much defensive programming sucks to read.