Changes between Version 18 and Version 19 of ExtensibleRecords


Ignore:
Timestamp:
Nov 14, 2007 2:09:11 PM (6 years ago)
Author:
guest
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ExtensibleRecords

    v18 v19  
    4242The proposals which are implemented as libraries put labels in conid (at the value level) and tycon (at the type level). In other words they must begin with capital letters, not clash with any other constructor or type, and be declared before use. If we want to support labels as first-class objects, this is essential so that we can distinguish them from other objects. 
    4343 
    44 The other proposals allow labels to be arbitrary strings, and distinguish them by context. 
     44The other proposals allow labels to be arbitrary strings, and distinguish them from other objects by context. 
    4545 
    4646This is related to the problem of Label Sharing: if the label `L` is declared in two different modules `M1` and `M2`, both of which are imported, do we have one label `L` or two labels `M1.L` and `M2.L`? Should there be a mechanism for identifying labels on import? 
     
    7878 * {{{ (- L) :: Remove L a b => a -> b }}} 
    7979 * {{{ (+) :: Concat a b c => a -> b -> c }}} 
    80 The `Subrecord` predicate and `<-` operator could easily be added. The difference between '''Heterogeneous Collections''' and '''Poor Man's Records''' is that '''Poor Man's Records''' makes no attempt to sort labels or remove duplicates, so for example `{x = 3, y = 4}` and `{y = 4, x = 3}` have different types, so are certainly not equal (the updated version of November 2007 supports record projection and permutation, among most other operations). 
     80The `Subrecord` predicate and `<-` operator could easily be added. The difference between '''Heterogeneous Collections''' and '''Poor Man's Records''' is that '''Poor Man's Records''' makes no attempt to sort labels or remove duplicates, so for example `{X = 3, Y = 4}` and `{Y = 4, X = 3}` have different types, so are certainly not equal (the updated version of November 2007 supports record projection and permutation, among most other operations). 
    8181 
    8282= Implementation and Language support =