[erlang-patches] improved orddict performance

Rich Neswold <>
Fri Oct 4 13:26:02 CEST 2013


On Fri, Oct 4, 2013 at 5:19 AM, Raimo Niskanen <
> wrote:

> On Thu, Oct 03, 2013 at 10:27:42PM -0500, Rich Neswold wrote:
> > Any code that uses the orddict API should not end up with an improper
> list.
> > Any code that passes an improper list to orddict should break.
>
> But in the case of orddict, it is actually documented to have a
> data representation being an ordered list of key-value tuples.
>
> Therefore there is a possibility that someone has misused that knowledge
> and uses an improper ordered list of key-value tuples, which may not be
> violating the documentation...
>

If the documentation exposes the implementation (which is not a good idea,
either) as an ordered list of key-value tuples, then users shouldn't
complain when it doesn't handle improper lists.

-- 
Rich
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-patches/attachments/20131004/68b2406a/attachment.html>


More information about the erlang-patches mailing list