[erlang-questions] A style question

Robert Raschke rtrlists@REDACTED
Mon Feb 15 14:19:36 CET 2010


I'm not sure where you get your documentation from, but ... getting the
below links took me about 10 minutes!

On Mon, Feb 15, 2010 at 1:01 PM, Jayson Vantuyl <kagato@REDACTED> wrote:

> While we're at it, there are tons of dusty corners that people miss.
>
> There's the occasionally useful but wholly unknown syntax for multiple
> clauses in an anonymous fun:
>
> F = fun
>  (true) -> ok;
>  (false) -> failed
> end.
>
> http://www.erlang.org/doc/reference_manual/expressions.html#id2272623



> Or for that matter, using guards on anonymous funs (needed it once in an
> unusual list comprehension).
>
> See same section above.



> Or all of the oddness you can do with binary pattern matching:
> <<Len:4/integer, Data:Len/binary>>.
>
>
http://www.erlang.org/doc/reference_manual/expressions.html#id2272040
and
http://www.erlang.org/doc/programming_examples/bit_syntax.html



> Or pattern matching using ++.  Or matchspecs in general.
>

http://www.erlang.org/doc/reference_manual/expressions.html#id2270161
and
http://www.erlang.org/doc/apps/erts/match_spec.html



> Or the fiendishly undersupported bits like inet_res, binary comprehensions,
> parse tranforms, parameterized modules, -extends, etc.
>
>
Binary comprehensions:
http://www.erlang.org/doc/reference_manual/expressions.html#id2273560



> I like to believe that there will come a day that all of these things are
> documented clearly. Until then, I guess we'll have to document these things
> through cryptic rambling on the mailing list. :(
>
> Sent from my iPhone
>
>
>


More information about the erlang-questions mailing list