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]> 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. > > >
