Random notes from reading Programming Erlang:
Syntax
1 | |
REPL
1 | |
Module
1 | |
Function
1 | |
Record
1 | |
Control
case Expression of
Pattern1 [when Guard1] -> Expr_seq1;
Pattern2 [when Guard2] -> Expr_seq2;
...
end
if
Guard1 -> Expr_seq1;
Guard2 -> Expr_seq2;
...
end
try FuncOrExpressionSequence of
Pattern1 [when Guard1] -> Expressions1;
Pattern2 [when Guard2] -> Expressions2;
...
catch
ExceptionType: ExPattern1 [when ExGuard1] -> ExExpressions1;
ExceptionType: ExPattern2 [when ExGuard2] -> ExExpressions2;
...
after
AfterExpressions
end
Concurrency / Message box
1 | |
Then I read about OTP, it's pretty awesome.
Then I read
If a calls b in a loop and we recompile b, then a will automatically call the new version of b the next time b is called.
This is just insane ><