Changes between Version 4 and Version 5 of Records/DeclaredOverloadedRecordFields/COmpareSORF
- Feb 20, 2012 9:48:30 PM (2 years ago)
v4 v5 1 1 2 = DORF -- comparison to SORF = 2 = DORF -- comparison to SORF = 3 3 4 4 This is a brief point-by-point comparison to … … 19 19 In contrast: "The [SORF] proposal ... doesn't allow label names to be scoped: if one module internally uses "field" as a label name then another module can break the abstraction by using the same string "field"." SPJ goes on to discuss a work-round which he sees as "ugly", and concludes "we need scoped instances". DORF does not need any innovations around instances or type inference. 20 20 21 === Should `get` have a Proxy argument? === 21 '''Wild afterthought:''' 22 * DORF __does__ need to apply module control/representation hiding to the field selector function. 23 * But if that's controlled, perhaps it doesn't need to control the Proxy type(?) 24 * (In fact, the Proxy type is a bit of an annoyance, with a shadowy existence just out of sight from the application programmer, except for the need to export/import it.) 25 * Perhaps we could use Kinds instead, and take advantage of the inability to control their scope: 26 * Kinds could be just used, not declared. 27 * They could be `String` Kinds or some more abstract/compact/hidden representation. 28 29 30 === Should `get` have a Proxy argument? (and should `set` ?) === 22 31 23 32 "This choice does not make a major difference either way." [SPJ]. DORF likewise doesn't care. The prototype does use a Proxy argument, because it's implemented using types not Kinds, and GHC doesn't (yet) have type application.