[erlang-questions] widefinder update
Anders Nygren
anders.nygren@REDACTED
Mon Oct 29 17:24:17 CET 2007
On 29 Oct 2007 16:54:29 +0100, Bjorn Gustavsson <bjorn@REDACTED> wrote:
> "Anders Nygren" <anders.nygren@REDACTED> 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.
Good to hear that.
/Anders
>
> I assume that HiPE's native-code compiler does the same optimization.
>
> /Bjorn
> --
> Björn Gustavsson, Erlang/OTP, Ericsson AB
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://www.erlang.org/mailman/listinfo/erlang-questions
>
More information about the erlang-questions
mailing list