<html><body><div style="font-family: times new roman, new york, times, serif; font-size: 12pt; color: #000000"><div>Normally I agree with you but in this case we decided that we should have an orddict which completely specified the internal representation. The whole point of orddict is that the internal structure is documented and can be relied on. So you *can* use it as a proplist if you want, or as a list of key-value options to a function. Re proplists I feel that the orddict API is cleaner.<br></div><div><br></div><div>I personally wouldn't worry about compatibility if someone calls these functions with an improper list. But then again I have rarely worried about backwards compatibility. :-)<br></div><div><br></div><div>Robert</div><div><br></div><hr id="zwchr"><blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><b>From: </b>"Rich Neswold" <rich.neswold@gmail.com><br><b>To: </b>"erlang patches" <erlang-patches@erlang.org><br><b>Sent: </b>Friday, 4 October, 2013 1:26:02 PM<br><b>Subject: </b>Re: [erlang-patches] improved orddict performance<br><div><br></div><div dir="ltr">On Fri, Oct 4, 2013 at 5:19 AM, Raimo Niskanen <span dir="ltr"><<a href="mailto:raimo+erlang-patches@erix.ericsson.se" target="_blank">raimo+erlang-patches@erix.ericsson.se</a>></span> wrote:<br><div class="gmail_extra">
<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class=""><div class="h5">On Thu, Oct 03, 2013 at 10:27:42PM -0500, Rich Neswold wrote:<br>
> Any code that uses the orddict API should not end up with an improper list.<br>
> Any code that passes an improper list to orddict should break.<br>
<br>
</div></div>But in the case of orddict, it is actually documented to have a data representation being an ordered list of key-value tuples.<br>
<br>
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...<br></blockquote></div><div class="gmail_extra">
<br></div>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.<br clear="all">
<div><br></div>-- <br>Rich<br>
</div></div>
<br>_______________________________________________<br>erlang-patches mailing list<br>erlang-patches@erlang.org<br>http://erlang.org/mailman/listinfo/erlang-patches<br></blockquote><div><br></div></div></body></html>