In addition to the answers already given (the "historical accident" one notwithstanding), I think there's also something to be said for the use of Data.Map
in Haskell compared to Hash
in Ruby or similar things; map-like objects in other languages tend to see a lot more use for general ad-hoc storage.
Whereas in Haskell you'd whip up a data
definition in no time at all, creating a class in other languages tends to be somewhat heavy-weight, and so we find that even for data with a well-known structure, we'll just use a Hash
or dict
or similar. The fact that we have a direct syntax for doing so makes it all the more attractive an option.
Contrast to Lisp: using MAKE-HASH-TABLE
and then repeatedly SETF
ing it is relatively annoying (similar to using Data.Map
), so everything gets thrown into nested lists, instead—because it's what's convenient.
Similarly, I'm happy that the most convenient choice for storing data is creating new types to suit, and then I leave Data.Map
to when I'm actually constructing a map or hash-table as an intrinsic component. There are a few cases where I think the syntax would be nice (usually just for smaller throw-away programs), but in general I don't miss it.