Re:Programming Rules and Conventions
by peteretep on Monday February 04, 2013 @11:28AM
(#5164960)
Although the examples are in Erlang, none of this seems particularly Erlang-specific
[ Parent
| on HN ]
Re:Programming Rules and Conventions
by banachtarski on Monday February 04, 2013 @01:28PM
(#5165983)
This isn't true.
For example:
3.13 Do not program "defensively" suggests that the programmer should allow functions to crash if given unhandled input types. This does not work in most other programming languages to create a fault tolerant application.
A number of advice points about process/module organization also do not apply to most languages.
Tagging messages? Makes sense in lisp (and a few others), but again, not in most languages
Not to trap exits, again Erlang specific.
I could go on and on. Did you even read this?
> 3.13 Do not program "defensively" suggests that the programmer should allow functions to crash if given unhandled input types. This does not work in most other programming languages to create a fault tolerant application.
Incidentally, this applies to languages with exceptions as well. The hardest to catch bugs are when bad behaviour is hidden inside a too general try/catch.
> Not to trap exits, again Erlang specific.
Yes.