I really like Simon PJ's "proposal for records in Haskell". Some
reasons for this are:
- Anonymous record types. For example, an anonymous record type can
easily hold ad-hoc keyword arguments. (Oh, just noticed that said in
the document.)
- To quote the document, "We can express polymorphic update (a
standard awkward case) quite nicely". (If I'm not mistaken (please
tell me if so), OverloadedRecordFields proposal fails here.)
- Nice syntax (in my opinion).

Possible record member set syntax:
let x.k = value in x
Pros:
- No new syntax
- Least Surprise
Cons:
- Verbosity (especially such: (\ x -> let x.k = value in x))

On 20/10/2011, Simon Peyton-Jones <simo...@microsoft.com> wrote:
> | Subject: Re: Records in Haskell
> |
> | I have added my proposal to the wiki.The only downsides to it that I can
> see are:
>
> Thanks to Barney for articulating a proposal for records in Haskell.  Over
> various plane rides and ICFP chats I've worked out some more details.  It's
> not as simple as I'd hoped.
>
> I'm underwater with stuff at the moment but I did find the time to capture a
> summary here
>       http://hackage.haskell.org/trac/ghc/wiki/Records/OverloadedRecordFields
>
> Please do correct errors, suggest solutions, or explore variants.
>
> Simon
>
> _______________________________________________
> Glasgow-haskell-users mailing list
> Glasgow-haskell-users@haskell.org
> http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
>


-- 
Matthew Farkas-Dyck

_______________________________________________
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Reply via email to