[erlang-questions] exception when no match found

9 views
Skip to first unread message

Tiago Cury

unread,
Jun 12, 2013, 3:30:33 PM6/12/13
to erlang-q...@erlang.org
I think that erlang would just bypass the entire case..of instead of throw an exception when no match found. It's can economize more lines of code.

_______________________________________________
erlang-questions mailing list
erlang-q...@erlang.org
http://erlang.org/mailman/listinfo/erlang-questions

Fred Hebert

unread,
Jun 12, 2013, 4:33:28 PM6/12/13
to Tiago Cury, erlang-q...@erlang.org
Well I think it shouldn't.

Crashes can economize me headaches by being very loud things instead of
silent buggers that I wonder why the hell they don't get to run and
stuff after them fails.

Loïc Hoguin

unread,
Jun 12, 2013, 4:43:20 PM6/12/13
to Tiago Cury, erlang-q...@erlang.org
(Sorry, failed to Reply All.)

A case is an expression, it returns a value. You can't have implicit
clauses because the compiler can't guess what this value should be.
--
Loïc Hoguin
Erlang Cowboy
Nine Nines
http://ninenines.eu
Reply all
Reply to author
Forward
0 new messages