[erlang-questions] bit syntax: 0-sized segments
Thu Mar 7 14:43:05 CET 2013
In revising some HiPE test suites for bit syntax, I noticed some pattern
matching with 0-sized segments. They can be illustrated by the following:
Eshell V5.10.2 (abort with ^G)
1> <<X:0>> = <<>>.
I think this is interesting and some may consider the above pattern
matching a bit weird, possibly preferring an exception instead.
The documentation is mute about the presence of these 0-sized segments:
I think that they need to be explicitly mentioned there, possibly
together with some rationale for their existence.
More information about the erlang-questions