[erlang-questions] byte() vs. char() use in documentation
Thu Apr 28 18:26:02 CEST 2011
In the Erlang documentation, the language of types and specs makes a
clear distinction between the following two types:
byte() :: 0..255
char() :: 0..16#10ffff
I think that nowadays there are very good reasons to have this distinction.
In trying to fix a bug today, I happened to notice that some key types
of Erlang are inconsistent with this view in the Erlang/OTP
documentation (In http://erlang.org/doc/man/erlang.html), most notably:
iolist() :: [char() | binary() | iolist()]
binary_to_list(Binary) -> [char()]
binary_to_list(Binary, Start, Stop) -> [char()]
bitstring_to_list(Bitstring) -> [char()|bitstring()]
BitstringList :: [BitstringList | bitstring() | char()]
which actually triggered this mail.
I think all the occurrences of char() above should read byte() instead.
If yes, could somebody at OTP (or some kind volunteer) please clean up
this mess? (I can provide a fix for the documentation of the 'erlang'
module if you want me to.)
More information about the erlang-questions