[Haskell-cafe] Idiomatic Haskell equivalent of "keyword arguments" to functions

David House dmhouse at gmail.com
Fri Dec 29 17:34:42 EST 2006


On 29/12/06, Paul Moore <p.f.moore at gmail.com> wrote:
> I looked at wxHaskell for inspiration - its approach (button f [text
> := "Quit", on command := close f]) looks quite readable, but slightly
> unusual (to me) for Haskell. It also seems fairly complex to implement
> (ie, my head hurt when I tried to follow the types involved, but maybe
> that's just because it's getting late :-))

I forgot one - it's extensible, so if you want to add extra parameters
you don't need to change the type of the function, and you don't need
to change every single call site either.

-- 
-David House, dmhouse at gmail.com


More information about the Haskell-Cafe mailing list