Changes between Version 10 and Version 11 of Records
- Timestamp:
- 10/20/11 09:32:14 (19 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Records
v10 v11 32 32 == Solutions == 33 33 34 I know of t wosorts of solutions:35 1. Better name spacing 36 2. Type directed name resolution 37 3. Nonextensible records with polymorphic selection & update 34 I know of three sorts of solutions: 35 1. Better name spacing; see below 36 2. Type directed name resolution; see below and [wiki:TypeDirectedNameResolution] 37 3. Nonextensible records with polymorphic selection & update; see below and [wiki:Records/OverloadedRecordFields] 38 38 39 39 '''Are there any other approaches?''' … … 64 64 === Nonextensible records with polymorphic selection & update === 65 65 66 The ideas in "first class record types" still work in the case of nonextensible records. Using a simplified version of Labels #2104 we can implement truly polymorphic selection and update, which would be more expressive than TDNR and wouldn't need a whole new type resolution mechanism. Here is a concrete proposal:66 The ideas in "first class record types" still work in the case of nonextensible records. Using a simplified version of Labels #2104 we can implement truly polymorphic selection and update, which would be more expressive than TDNR and wouldn't need a whole new type resolution mechanism. Here is a concrete proposal (Barney Hilken); see also [wiki:Records/OverloadedRecordFields]: 67 67 68 68 1. Introduce a built-in class `Label`, whose members are strings at the type level. We need a notation for them; I will use double single quotes, so `''string''` is treated as if it was defined by
