I personally find the performance overhead added by the dependent contracts 
in racket/dict to be too burdensome for general use in large applications. 
I would be much happier if the default interface was instead comprised of 
the simple contracts the documentation for gen:dict seems to suggest.

Am I in a small minority with this opinion? Would people be amicable to a 
PR that simplified these contracts? Or would losing the extra contract 
checking be a noticeable drawback for some projects?

As an anecdotal side note: this overhead initially gave me a bad taste in 
my mouth for Racket's generics (I initially thought they were to blame for 
the performance slowdown). It wasn't until later that I realized the 
overhead from using generics is _quite reasonable_ (I've used them in Typed 
Racket to speed things up in fact) and that really this is an issue of the 
pros and cons of using expressive, dependent contracts. Anyway, I hope 
others haven't been similarly turned off to generics (which are awesome!) 
if they've noticed undesirable overhead while trying out racket/dict.

Best,
Andrew

P.S. I think ideally both interfaces should be provided (one with simple 
contracts and one without) but doing this right might require some tools 
that haven't been invented yet (in particular, this seems like another use 
case for what I like to call "negotiable contracts," which would allow 
modules to provide multiple contract options for identifiers that a 
requiring module could then specify at compile time which they want with a 
require form -- I should really get on this...)

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-dev/2fcb793a-c808-4093-ba5a-ce3b35413905%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to