[erlang-questions] is there "return" in Erlang.

Attila Rajmund Nohl attila.r.nohl@REDACTED
Mon Feb 28 15:40:31 CET 2011

2011/2/28, Jachym Holecek <freza@REDACTED>:
> Oh, true, forgot about that -- but the one with 'if' can't, or consider
> 'switch' as another example. Point is in C, some things are statements
> which do things without having a value themselves and some things are
> expressions yielding values.
> In Erlang, life is simpler -- everything is an expression, you can bind it
> to a variable or just use it in-place anywhere an expression is allowed.

Except the throw statement...

> This means you can compose small bits of meaning in any way you want, free
> from arbitrary limitations like the ones in C.

Erlang has its own set of "arbitrary limitations", for example you
can't write any kind of exception in an 'if'...

More information about the erlang-questions mailing list