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

John Meacham john at repetae.net
Thu May 22 20:08:16 UTC 2014


The issue i have is not the concept, I have actually written similar
classes in a few situations, the issue is that there is little value
in a shared implementation of it. There is no underlying meaning to
'default' that crosses project boundries. seeing 'Default a => blah '
in a type signature doesn't convey any useful information about a
other than at some point, someone somewhere added a to a list based on
their current whim.

That said, I have written the class a few times, and that is fine,
just because the code looks the same it doesn't necesarily mean it is
conceptually reusable  because they had a specific meaning. looking at
my codebase I find

PerlDefault  - what the value would default to if 'undef' in perl.
used when generating perl code.
HsSynDefault  - haskell syntax default, bits of haskell syntax (HsExp,
HsDecl, etc..) with the annotations set to default leaving only the
source bits to fill in.

But both have defined meanings and when I see them in a type
signature, it conveys useful information.


-- 
John Meacham - http://notanumber.net/


More information about the Libraries mailing list