[Hugs-users] Record puns, time for removal?

Bulat Ziganshin bulat.ziganshin at gmail.com
Wed Nov 1 02:53:45 EST 2006

Hello Lennart,

Tuesday, October 31, 2006, 1:16:43 AM, you wrote:

> Funny that you should mention this idea.  I spent last night and this
> morning implementing it in ghc.  But I use '..' instead of '*'.

thank you a lot! it's sad that we not discussed this earlier :)

> The punning is available both for expressions and patterns.

that you mean? thing mentioned by Iavor?:

f Record1 {..} = let a = 1
                     b = 2
                 in Record2 {..}

> I am of two minds about this extension.  It introduces bound  
> variables without mentioning the variable at the binding site.  This  
> can be error prone.  (But 'import' has similar problems.)

> Dubious as it is, when using large records it reduces the amount of  
> boiler place code significantly.

exactly. and you name it - _boilerplate_ code. i can distinguish the
things that is essential for understanding algorithm from things that
just eats the space. and describing which options i'm going to use in
this function is not the best job. ultimately, field selection
operator will be enough, but it's beyound of our current abilities

Best regards,
 Bulat                            mailto:Bulat.Ziganshin at gmail.com

More information about the Haskell-prime mailing list