[erlang-questions] What is wrong with this list?

David Terrell <>
Tue Sep 4 22:24:14 CEST 2007


On Tue, Sep 04, 2007 at 09:05:27PM +0100, David Hopwood wrote:
> Hmm -- aren't improper lists almost always an error? Why are they allowed?
> (Static typing isn't needed to prevent them, and the performance argument
> against checking that each tail is a cons cell or nil is weak; it is an
> O(1) tag check that can often be optimized out.)

There was discussion last week about how binaries are allowed in the
tail of an iolist, i.e.
list_to_binary(["abc" | <<"def">>]) 
is valid.

Your question is still a good one, though :)

-- 
David Terrell

((meatspace)) http://meat.net/



More information about the erlang-questions mailing list