[erlang-questions] Strange difference between construction and matching of binaries
Mon Dec 28 02:23:16 CET 2015
I'd just like to mention this related bug-report
http://bugs.erlang.org/browse/ERL-44 reported by yet another surprised
On Wed, Dec 23, 2015 at 7:16 PM, Ameretat Reith <ameretat.reith@REDACTED>
> 1) AB = <<"AB">>.
> 2) << AB:1/bytes, $B >> = AB. %% does not match
> 3) AB = << AB:1/bytes, $B >>. %% will match
> It's another example which I faced some days ago. I think size
> specifier in matching segment just apply to unbound variables, in
> another word when construction will happen.
> I think It's just an implementation issue and a try to avoid making
> intermediate variables  and matching will checked bit-by-bit with
> referenced variables and finished as soon as It finds bits are not
> aligned anymore. I very like hear more about this too :)
> erlang-questions mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions