[erlang-questions] gb_trees, strange behaviour

John Hughes john.hughes@REDACTED
Sun Nov 7 10:36:13 CET 2010


Wouldn't it be quite cheap to actually check the invariant in from_ord_dict?
It also requires that there be no duplicate keys, which an orddict doesn't guarantee. Ran into this recently in a QuickCheck spec!

John


Sent from my iPhone

On 7 Nov 2010, at 03:49, Fred Hebert <mononcqc@REDACTED> wrote:

> I definitely agree with that. The same should also be done with ordsets.
> 
> On Sat, Nov 6, 2010 at 12:53 PM, Kostis Sagonas <kostis@REDACTED> wrote:
> 
>> 
>> 
>> Also, in an ideal world, the orddict() type should have been declared
>> opaque instead so that tools such as dialyzer complain when finding code
>> that creates random lists (like yours) and passes them to a function
>> expecting an orddict() instead.
>> 
>> Kostis
>> 
>> 
>> ________________________________________________________________
>> erlang-questions (at) erlang.org mailing list.
>> See http://www.erlang.org/faq.html
>> To unsubscribe; mailto:erlang-questions-unsubscribe@REDACTED
>> 
>> 


More information about the erlang-questions mailing list