data-default WAS: [containers] Proposal: Change to the Data.Map Monoid

Daniel Trstenjak daniel.trstenjak at gmail.com
Thu May 22 08:10:27 UTC 2014


Hi João,

> ... with an obvious default value ...

I think that's the problem some people have, that the default values
for several types aren't obvious at all and therefore you have to know
the default values of several types to easily read code using 'def'.

The default values for container like types - like String or List - are
mostly quite obvious, they're just the empty ones. But the default
values for types like Int, Bool of Float aren't that obvious and they
certainly don't make sense in any use case.

That's also the reason why an Empty type class was advocated instead
of the Default one, because than it's really obvious what the result
for container like types is.


Greetings,
Daniel


More information about the Libraries mailing list