[erlang-questions] Try-catch-after considered harmful.
Laura M. Castro
lcastro@REDACTED
Mon Nov 24 12:40:42 CET 2014
> The try-catch syntax was deliberately chosen to be reminiscent of
> Java, the idea being that if you understood this try-catch consequence
> in Java you'd easily understand the Erlang code.
>
> The problem I see with this is that programmers with previous
> experience in Java are tempted to blindly convert sequential try-catch
> code in Java into sequential try-catch code in Erlang
In my experience, this is indeed the case. Not as often, but same goes
for 'if' vs pattern-matching on function clauses.
--
Laura M. Castro
Department of Computer Science
Universidade da Coruña (Spain)
http://www.madsgroup.org/staff/laura
More information about the erlang-questions
mailing list