[Haskell-cafe] Records (was Re: [Haskell] Improvements to GHC)

Sebastian Sylvan sebastian.sylvan at gmail.com
Thu Nov 17 12:56:09 EST 2005


On 11/17/05, Greg Woodhouse <gregory.woodhouse at sbcglobal.net> wrote:
> Isn't there a potential for confusion with function composition (f . g)?
>
> That being said, I like this idea (I just need to think it through a bit).
>

I've been wanting this for ages. It's SO much better than the current
horribly broken records we have.
There could be confusion with function composition, but there's no
ambiguity (compositon have spaces around the dot, while record
accessors do not).
Personally I think that the dot is way to good of a symbol to be
"wasted" on function composition. I mean, how often do you really use
function composition in a way which doesn't obfuscate your code? I use
($) way more often than (.). Some people do use it more often than I
do, but I find that in most cases except simple "pipelined" functions
it only makes the code harder to read.
I'd rather function composition was left out of the prelude
alltogether (or defined as (#) or something).

Anyway. The current records system is a wart.



> Joel Reymont <joelr1 at gmail.com> wrote:
> I second this motion! I rather like Simon's proposal.
>
> On Nov 17, 2005, at 5:00 PM, Fraser Wilson wrote:
>
> > Yeah, I thought you might have tried that at some point :-)
> >
> > I like
> http://research.microsoft.com/~simonpj/Haskell/records.html
> >
> > cheers,
> > Fraser.
>
>
>
>
>
>
>
>
>
>
> ===
> Gregory Woodhouse  <gregory.woodhouse at sbcglobal.net>
>
>
> "Interaction is the mind-body problem of computing."
>
> --Philip Wadler
>
>
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
>
>


--
Sebastian Sylvan
+46(0)736-818655
UIN: 44640862


More information about the Haskell-Cafe mailing list