On Sun, 2012-05-06 at 22:53 -0700, Jonathan M Davis wrote:
[...]
> We have RedBlackTree, so we have a set already. What we don't have is a 
> HashSet. However, once the custom allocator stuff has been sorted out, I'd 
> fully expect to have one in std.container along with a variety of other 
> container types which we really should have but don't.

I certainly went immediately to std.container to look for the work set,
map, etc. in some guise. I only posted after finding nothing
appropriate.

I guess the issue here is that maps (aka dictionaries, aka associative
arrays) are in the D language core (as in Python) rather than being is
the library (as in C++). This indicates set should be in the core rather
than in the library.

I wonder if the tradition of exposing HashMap and TreeMap was a
disservice by C++ and Java? Map and Set are programmer level concepts.
Where there are algorithmic issues that require knowing about trees or
has tables then the programmer is not working at the map or set level.

And the programmer has no control over how D's associative arrays work.

And let's not mention Java's LinkedHashMap.  :-)

-- 
Russel.
=============================================================================
Dr Russel Winder      t: +44 20 7585 2200   voip: sip:russel.win...@ekiga.net
41 Buckmaster Road    m: +44 7770 465 077   xmpp: rus...@winder.org.uk
London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to