Re:Erlang vs node.js
by davidw on Thursday April 29, 2010 @11:24AM
(#1304732)
Sure, but if you're talking at a high level, what is the "let it crash" stuff good for at a practical level? I think I'd put it under 'fault tolerance', but maybe there's another category I should add? The original poster mentions I left it out, so it'd be fair to add it, but it needs a high-level, practical label to put it under.
[ Parent
| on HN ]
Re:Erlang vs node.js
by gordonguthrie on Thursday April 29, 2010 @03:23PM
(#1305662)
The first key point about 'let it crash' is that you drive towards zero-defect programming. Every time the system walks away from the happy path you crash write a log.
Every day with our production systems we check the live production logs to identify defects that we try and remove.
The second key point about 'let it crash' is that with OTP your system is always macro stable. Even if every function is only a stub and every stub contains exit(bleh) and always fails at a micro level, your system is always macro stable - the gift that keeps on giving!
Re:Erlang vs node.js
by silentbicycle on Thursday April 29, 2010 @11:48AM
(#1304822)
Fault tolerance and declarative programming. It's easier to write code that clearly expresses your intent when you don't need to clutter it with error-handling code.
Likewise, pattern matching completely eliminates complex layering of nested 'if' statements, and is an alternative solution to the kinds of problems typically solved with polymorphic dispatch in OO languages.