Binary pattern syntax anomaly
Kostis Sagonas
kostis@REDACTED
Fri Oct 10 15:57:14 CEST 2003
Is there any particularly good reason why the following piece of
Erlang code works correctly
B = <<2,42>>,
<<1, B/binary>> = <<1, <<2,42>>/binary>>.
while the following (semantically equivalent) code
<<1, <<2,42>>/binary>> = <<1, <<2,42>>/binary>>.
gets rejected as an illegal pattern?
Isn't this a bug, or at least a totally unnecessary restriction
in the syntax of binary patterns?
Kostis.
More information about the erlang-questions
mailing list