[Feature Request] Adding to D lang "set" built-in

David Nadlinger see at klickverbot.at
Mon May 7 05:52:56 PDT 2012


On Monday, 7 May 2012 at 06:05:47 UTC, Russel Winder wrote:
> 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.

Some people say that abstracting away big-O complexity should be 
a capital offense, and I agree (preferably in slightly less 
drastic words, though). Additionally, a tree-based map is 
naturally ordered, whereas a hash map is not – for me, that's 
enough to warrant exposing what seems to be a »detail«, at 
least in languages like C++ and D.

David


More information about the Digitalmars-d mailing list