Changes between Version 67 and Version 68 of Records

Apr 20, 2012 2:07:47 PM (5 years ago)

link to edward zhang's ur records explanations


  • Records

    v67 v68  
    117117[ Roy], a functional language that targets only javascript, also has structural typing which prevents clashes and allows abstraction over fields.
    119 [Ur/Web has a very advanced records system]. If someone could look at [ 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 very advanced records system]. It is exaplained in  [ the UR implementation paper]. Edward Zhang attempts to explain it to Haskellers:
    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.
    149 === counterpoint to the above ===
     149==== counterpoint to the above ====
    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.