[erlang-questions] Human readable errors in lists module

Ulf Wiger ulf@REDACTED
Tue Feb 10 17:13:39 CET 2009


2009/2/10 Raimo Niskanen <raimo+erlang-questions@REDACTED>:
>
> But if we change zipwith/2,3 we must in the name of consistency
> do it for all functions in the lists module, and for all other
> modules in stdlib, and kernel, and erts. ...

Hmm... isn't this a case where "the better is the enemy of the good"* ?

No one in their right mind would try to write code that traps a
function_clause exception from inside a library module.
In other words, you have an exception that is unusable *and*
hard to debug. So, in the name of consistency...  ;-)

BR,
Ulf W

* Often quoted as "The best is the enemy of the good", and attributed to
Voltaire, but according to http://en.wikiquote.org/wiki/Voltaire, the above
stems from "Le mieux est l'ennemi du bien", or "Il meglio è l'inimico del
bene" - for whatever reason, Voltaire apparently felt obliged to express it
in Italian too.

While we're abusing Voltaire quotes, here are a few more:

"It is dangerous to be right in matters where established men are wrong."
(also a famous erlang proverb)

and indeed,

"A witty saying proves nothing."

(And I'm struggling with submitting expense reports and sorting receipts,
in case you're wondering why this sudden interest in trivia.)



More information about the erlang-questions mailing list