Changes between Version 10 and Version 11 of Records


Ignore:
Timestamp:
Oct 20, 2011 4:32:14 PM (4 years ago)
Author:
simonpj
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Records

    v10 v11  
    3232== Solutions ==
    3333
    34 I know of two sorts of solutions:
    35  1. Better name spacing
    36  2. Type directed name resolution
    37  3. Nonextensible records with polymorphic selection & update
     34I 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]
    3838
    3939'''Are there any other approaches?'''
     
    6464=== Nonextensible records with polymorphic selection & update ===
    6565
    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:
     66The 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]:
    6767
    68681. 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