[erlang-questions] [clarify] Variable binding in case clause and coding style
Dmitri Girenko
Dmitri.Girenko@REDACTED
Mon Mar 10 12:07:18 CET 2008
Hi all,
I have a question about variable binding inside the case clause, that I
sometimes use to simplify some code like this:
case Endianness of
big-> <<A:1/unit:32-big, Rest/binary>>;
little-> <<A:1/unit:32-little, Rest/binary>>
end,
do_something(A,Rest).
But this seems to be a kind of... hack. I wonder what problems can this
coding style cause? Can there be any problems with parse
transformations? With refactoring tools?
Dmitri Girenko
Akumiitti Oy
More information about the erlang-questions
mailing list