On 12/29/06, Neil Mitchell <[EMAIL PROTECTED]> wrote:
Records are your friend.
[...]
The other alternative is:

data EmailParams = Body String
                            | Port Int
                            | Mailserver String

Neat ideas. Thanks. I guess there could there be disadvantages
involved in using a list of arguments, rather than a curried function
(can't easily do partial application, for example) - but I don't know
if these would be a big deal in any practical program.

As I mentioned, I'm interested in trying to expand my brain, as well
as just solve a particular problem :-)

Thanks for the ideas - I'll ponder on them.

On 12/29/06, David House <[EMAIL PROTECTED]> wrote:
On 29/12/06, Paul Moore <[EMAIL PROTECTED]> wrote:
> I looked at wxHaskell for inspiration

This is actually a really nice solution, if you think about it:
[...]

Oh, in principle I agree (your 3 reasons are exactly why I like
keyword parameters in Python). I'm not particularly sure if it's a bit
over-complex for the sorts of things I have in mind, but it certainly
looks nice in wxHaskell.

Try again to understand the typing, hopefully you'll see this is
probably The Best Way. If you have any questions about the typing
itself, just post them here.

I'm sure I can follow the typing with a bit of thinking, and it should
be educational to work it through.

Thanks to both of you for some useful ideas.

Paul.
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to