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

Evan Laforge qdunkan at gmail.com
Sun May 25 00:14:53 UTC 2014


On Sat, May 24, 2014 at 2:11 PM, Markus Läll <markus.l2ll at gmail.com> wrote:
> So I would be +1 for adding a class to the base (as many would otherwise
> re-implement it anyway), but with no instances. The module could also state
> the policy behind the class, i.e "don't write defaults for widely used
> types/types that you didn't create yourself" or whatever else people agree
> upon.

There's not much point to adding a class with no instances, it's not
exactly "re-implement" if it's just one line to define.  Put another
way, you can't say everyone "re-implements" it if there's no
implementation!  And since classes are global, it's anti-modular.
It's ok to define non-modular but convenient things in your own
program, but the standard library should emphasize modularity.


More information about the Libraries mailing list