[erlang-questions] widefinder update

Bjorn Gustavsson <>
Mon Oct 29 16:54:29 CET 2007

"Anders Nygren" <> writes:

> Some random thoughts
> -The compiler should treat don't care variable (_Var) the same
> as (_), and not bind them.
> I like to be able to write
> <<_Type:TLen/binary,_X:XLen/binary, Val:Len/binary....>>
> instead of
> SkipLen=TLen+XLen,
> <<_:SkipLen/binary,Val:Len/binary...>>

The BEAM compiler treats all variables the same.

If the compiler finds that a variable is not used, it will NOT
match out the binary.

I assume that HiPE's native-code compiler does the same optimization.

Björn Gustavsson, Erlang/OTP, Ericsson AB

More information about the erlang-questions mailing list