Atoms in I/O lists

James Hague <>
Wed Dec 15 16:10:11 CET 2004


>1) If we would allow atoms in I/O lists,
>why not then also floats and all other basic
>types that have TYPE_to_list/1 BIFs.

Because there are format issues with floats, such as endianness and single
vs. double precision.  With bytes there are no such issues.

>3) A lot of application code out there
>probably mangles I/O lists as they are known
>today. Such code would have to be rewritten.

True, sadly.

I don't feel strongly about this issue.  I've simply noticed that I tend to
use atoms for a lot of things internally, because they're so simple, and end
up converting them to lists for display or writing results to a file.
Technically there's no reason to convert them to lists, because the
characters making up the atom name are already stored somewhere.



More information about the erlang-questions mailing list