[erlang-questions] Dialyzer and improper lists
Thu Dec 27 00:28:21 CET 2012
It appears dialyzer complains loudly about any code that builds improper
lists. And there appears to be no local way to silence that warning.
It's true that sometimes it's a sign of bug. But on the other hand dialyzer
docs saying there's no reason to use improper lists (even in ALL CAPS) is
clearly wrong. According to my understanding improper list of size 2 needs
just 2 words (single cons pair and no headers), but binary tuple needs one
extra word for header.
And erlang's stdlib has a bunch of places where cons pair is used as a
binary tuple. E.g. dict.
While docs should not necessarily point folks to low-level tricks like
that, they IMHO should be fixed to reflect reality.
But IMHO most importantly, there should be some way to say to dialyzer "hey
I really mean improper list here" without disabling improper list check
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions