Note that we're not lazy, but we know that contributing to Julia is highly addictive. We want more people to look at Base with a critical eye in order to discover inconsistencies like this.
If you don't want to try, the fix will be committed within an hour. Ivar kl. 18:30:55 UTC+2 lørdag 2. august 2014 skrev Stefan Karpinski følgende: > > Would you be willing to take a crack at making a pull request? This should > be a one-liner, somewhere in the base/set.jl file with the obvious > definition. > > > On Sat, Aug 2, 2014 at 10:04 AM, Ed Scheinerman <[email protected] > <javascript:>> wrote: > >> I work a good deal with Set objects. When I found the sizehint function, >> I thought this would be useful to use as the data structure supporting my >> sets would be pre-allocated to be large enough for what I anticipated >> putting therein. But sizehint doesn't apply to Set objects: >> >> julia> A = Set() >> Set{Any}() >> >> julia> sizehint(A,1000) >> ERROR: no method sizehint(Set{Any},Int64) >> >> It appears that, under the hood, Set objects are built on top of Dict >> objects. So one can do this: >> >> julia> sizehint(A.dict,1000) >> Dict{Any,Nothing}() >> >> But if the implementation of Set changes, this breaks. >> >> So I'm voicing all this to request that sizehint(Set) be implemented. >> >> >> >
