Changes between Version 60 and Version 61 of Records


Ignore:
Timestamp:
Feb 26, 2012 7:52:36 PM (2 years ago)
Author:
GregWeber
Comment:

compare DORF

Legend:

Unmodified
Added
Removed
Modified
  • Records

    v60 v61  
    6767=== Comparisons === 
    6868 
    69 The benefit of abstracting over field names in Overloading is being able to write code that works against any Record with a given field. So I can have a function: 
     69 
     70The DORF proposal is a variant of SORF with similar goals. However, it only solves the narrow name-spacing issue within a module. If a record is imported into another module, it will still clash. 
     71 
     72DORF and SORF abstract over fields. The benefit of abstracting over field names is being able to write code that works against any Record with a given field. So I can have a function: 
    7073 
    7174{{{ 
     
    8285    * the extra constraints complicated the type checker and did not play well with higher kinded type variables (at least in the code I had then, I do not claim that this is nessecarily so). 
    8386 
    84 Overloading without abstraction over fields may be able to avoid some of these potential downsides, and a judicious (no virtual fields, etc) implementation of either could look very similar to the programmer. 
     87SORF without abstraction over fields may be able to avoid some of these potential downsides, and a judicious (no virtual fields, etc) implementation of either could look very similar to the programmer. 
     88 
     89SORF has also been recognized as an approach to internal type resolution, whereas namespacing would require an internal SORF-like step or some other approach to avoid the need for lots of annotations. 
     90 
    8591 
    8692=== Type directed name resolution === 
     
    112118Other FP languages where I looked for a record implementation but it appeared they have no solution for records with the same fields (my information could be wrong/out-dated) ocaml, oz. However, the O in OCaml is for objects, and objects have structural typing that supports abstraction over fields. 
    113119 
    114 I couldn't find great specific information on record implementation ML variants. Best I can tell, SML does not allow records in the same module with the same field. Records from other modules require name-spacing or must be opened up similar to Agda.  
     120I couldn't find great specific information on record implementation ML variants other than SML#. Best I can tell, SML does not allow records in the same module with the same field. Records from other modules require name-spacing or must be opened up similar to Agda.  
    115121 
    116122