Changes between Version 14 and Version 15 of ExtensibleRecords


Ignore:
Timestamp:
Nov 13, 2007 11:11:48 AM (8 years ago)
Author:
guest
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ExtensibleRecords

    v14 v15  
    3535An important difference between the various proposals is what constitutes a valid record, and similarly a valid record type. The key points are: 
    3636 
    37  * Permutativity:: Are `{x :: Int, y :: Int}` and `{y :: Int, x :: Int}` the same type? The '''Poor Man's Records''' system distinguishes these two, which makes implementation much simpler, but means that any function which accepts permuted records must be polymorphic. 
    38  * Repeated Fields:: Is `{x :: Int, x :: Int}` a valid record type? Both '''Poor Man's Records''' and '''Scoped Labels''' allow this type, but other systems consider this an error. 
     37 * Permutativity:: Are `{X :: Int, Y :: Int}` and `{Y :: Int, X :: Int}` the same type? The '''Poor Man's Records''' system distinguishes these two, which makes implementation much simpler, but means that any function which accepts permuted records must be polymorphic. 
     38 * Repeated Fields:: Is `{X :: Int, X :: Int}` a valid record type? Both '''Poor Man's Records''' and '''Scoped Labels''' allow this type, but other systems consider this an error. 
     39 
     40= Label Namespace = 
     41 
     42The 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, and not clash with any other constructor or type. If we want to support labels as first-class objects, this is essential so that we can distinguish labels from other objects. 
     43 
     44The other proposals allow arbitrary labels, and distinguish them by context. 
    3945 
    4046= Type Systems =