Changes between Version 27 and Version 28 of Records


Ignore:
Timestamp:
Jan 7, 2012 11:27:20 PM (4 years ago)
Author:
GregWeber
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Records

    v27 v28  
    4747}}}
    4848
    49 and that can work for both Record and RecordClash because they both have a field a.
    50 With Namespacing this will fail to type check unless the compiler can determine the type of r. The advantage of Namespacing is that the implementation is clear, straightforward, and has already been done (whereas there are still questions as to the feasibility of Overloading). Namespacing also has other benefits related to namespacing that are not as directly related to solving the records issue.
    51 In the words of the Frege author, who abandoned Overloading:
     49and that can work for both Record and `RecordClash` because they both have a field `a`.
     50With Namespacing this will fail to type check unless the compiler can determine the type of r. The advantage of Namespacing is that the implementation is clear, straightforward, and has already been done (whereas there are still questions as to the feasibility of Overloading). Overloading has seen downsides in practice. In the words of the Frege author, who abandoned Overloading:
    5251
    5352    * only very inefficient code could be generated, if you have to access or update a field of some unknown record. In the end, every record type was basically a map.