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. 


Reply via email to