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

Reply via email to