[erlang-questions] case statements really required??

Björn Gustavsson bgustavsson@REDACTED
Sat Dec 5 10:24:30 CET 2009

On Sat, Dec 5, 2009 at 7:53 AM, kiran <kiran.khaladkar@REDACTED> wrote:
> Using functions and pattern matching makes the code more functional and can
> be more optimized by erlang vm than using cases (am i right?? comments
> please ... ).


Internally in the compiler, the Erlang program is first translated to
Core Erlang,
and in Core Erlang the only way to do matching is with "case". So matching
in function heads, if statements, and matching like "Pattern = Expr" in a
function body are all rewritten to Core Erlang "case" statements.

Björn Gustavsson, Erlang/OTP, Ericsson AB

More information about the erlang-questions mailing list