Atoms in I/O lists
James Hague
jamesh@REDACTED
Tue Dec 14 20:53:38 CET 2004
An I/O list is list where each element is an integer in the range 0-255, a
binary, or another I/O list. Several times now I've wished that atoms could
be directly included in I/O lists rather than having to call atom_to_list
first. With atoms legal in I/O lists, you could imagine atom_to_list call
quietly wrapped around each atom. In addition to being simpler, this could
result in less garbage being generated, assuming that I/O lists get parsed
in the C runtime.
One reason I can think of for not allowing this is if atom names can be
Unicode. I don't know if Erlang supports this. Are there other objections?
More information about the erlang-questions
mailing list