Changes between Version 67 and Version 68 of Records


Ignore:
Timestamp:
Apr 20, 2012 2:07:47 PM (3 years ago)
Author:
GregWeber
Comment:

link to edward zhang's ur records explanations

Legend:

Unmodified
Added
Removed
Modified
  • Records

    v67 v68  
    117117[http://roy.brianmckenna.org/ Roy], a functional language that targets only javascript, also has structural typing which prevents clashes and allows abstraction over fields. 
    118118 
    119 [Ur/Web has a http://www.impredicative.com/ur/tutorial/tlc.html very advanced records system]. If someone could look at [http://adam.chlipala.net/papers/UrPLDI10/UrPLDI10.pdf the UR implementation paper] and attempt to distill a records explanation to a Haskell point of view that would be very helpful! 
     119[Ur/Web has a http://www.impredicative.com/ur/tutorial/tlc.html very advanced records system]. It is exaplained in  [http://adam.chlipala.net/papers/UrPLDI10/UrPLDI10.pdf the UR implementation paper]. Edward Zhang attempts to explain it to Haskellers: http://blog.ezyang.com/2012/04/how-urweb-records-work-and-what-it-might-mean-for-haskell/comment-page-1/#comment-3669 
    120120 
    121121Other 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. 
     
    147147I also have 21 Enum types which often conflict. I end up having to include the name of the type in the constructor, or rewording it awkwardly. 
    148148 
    149 === counterpoint to the above === 
     149==== counterpoint to the above ==== 
    150150 
    151151I (elaforge) have a project with 314 .hs files, containing 224 `^data .*=` lines, of which 104 define named record fields. They do tend to collect in large central modules: the largest one has 800 lines and 13 records defined in it. I have often wished for shorter record names, but I have never wished for two records in the same module with the same field name. Probably this is a result of the specific application, the example above looks like a database-style app that has lots of IDs instead of directly containing e.g. a Submission or a Conference.