Re: [Haskell-cafe] What I wish someone had told me...

2008-10-15 Thread wren ng thornton
John Lato wrote: Are you advocating introducing existential types to beginning Haskellers? I think something with the scary name existential quantification would greatly increase the head'splodin' on the learnin' slope. Certainly there's a place for them, but I wouldn't want to see new Haskell

Re: [Haskell-cafe] What I wish someone had told me...

2008-10-15 Thread Yitzchak Gale
Derek Elkins wrote: In general, to encode OO... turns out all you needed was recursive bounded existential quantification. Do you have a reference for that? Thanks, Yitz ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] What I wish someone had told me...

2008-10-15 Thread Karl Mazurak
Yitzchak Gale wrote: Derek Elkins wrote: In general, to encode OO... turns out all you needed was recursive bounded existential quantification. Do you have a reference for that? I'm not sure if this is precisely what Derek had in mind, but Bruce, Cardelli, and Pierce did a comparison of

Re: [Haskell-cafe] What I wish someone had told me...

2008-10-15 Thread Dan Weston
I suspect that more has been done since 1997. Isn't that pre-Oleg? Karl Mazurak wrote: Yitzchak Gale wrote: Derek Elkins wrote: In general, to encode OO... turns out all you needed was recursive bounded existential quantification. Do you have a reference for that? I'm not sure if this is

Re: [Haskell-cafe] What I wish someone had told me...

2008-10-14 Thread John Lato
Are you advocating introducing existential types to beginning Haskellers? I think something with the scary name existential quantification would greatly increase the head'splodin' on the learnin' slope. Certainly there's a place for them, but I wouldn't want to see new Haskell programmers

Re: [Haskell-cafe] What I wish someone had told me...

2008-10-14 Thread Jonathan Cast
On Tue, 2008-10-14 at 18:15 +0100, John Lato wrote: Are you advocating introducing existential types to beginning Haskellers? I think something with the scary name Invalid argument. existential quantification would greatly increase the head'splodin' on the learnin' slope. Invalid

Re: [Haskell-cafe] What I wish someone had told me...

2008-10-14 Thread Alexey Romanov
On Tue, Oct 14, 2008 at 9:14 PM, Jonathan Cast [EMAIL PROTECTED] wrote: On Tue, 2008-10-14 at 18:15 +0100, John Lato wrote: Are you advocating introducing existential types to beginning Haskellers? I think something with the scary name Invalid argument. existential quantification would

Re: [Haskell-cafe] What I wish someone had told me...

2008-10-14 Thread Alexey Romanov
On Tue, Oct 14, 2008 at 9:15 PM, John Lato [EMAIL PROTECTED] wrote: Are you advocating introducing existential types to beginning Haskellers? I think something with the scary name existential quantification would greatly increase the head'splodin' on the learnin' slope. Certainly there's a

Re: [Haskell-cafe] What I wish someone had told me...

2008-10-14 Thread Alexey Romanov
Well, they act like interfaces in argument types, just not variable or return types. Yours, Alexey Romanov On Tue, Oct 14, 2008 at 4:11 PM, John Lato [EMAIL PROTECTED] wrote: I was just thinking about what I wish someone had told me when I started working with Haskell (not that long ago).

Re: [Haskell-cafe] What I wish someone had told me...

2008-10-14 Thread Lennart Augustsson
I'm not advocating existential types in this case. I rarely use them myself. I was just pointing out that the mechanism for doing the OO thing exists in Haskell too, albeit looking a little different. I don't think there's anything weird about existential types, except an unfamiliar name. On

Re: [Haskell-cafe] What I wish someone had told me...

2008-10-14 Thread Lennart Augustsson
You can do equivalent of // List and MyList are different classes if (something) { return new List(); } else { return new MyList(); } in Haskell as well. But to do that you have to introduce an existential wrapper in the return type. In OO languages the existential wrapper is built in to OO

Re: [Haskell-cafe] What I wish someone had told me...

2008-10-14 Thread Derek Elkins
On Tue, 2008-10-14 at 13:11 +0100, John Lato wrote: I was just thinking about what I wish someone had told me when I started working with Haskell (not that long ago). It would have saved me a great deal of trouble. A recent quote of mine from HWN: * ddarius: Here's the short guide to

Re: [Haskell-cafe] What I wish someone had told me...

2008-10-14 Thread Derek Elkins
On Wed, 2008-10-15 at 05:39 +0800, Lennart Augustsson wrote: I'm not advocating existential types in this case. I rarely use them myself. I was just pointing out that the mechanism for doing the OO thing exists in Haskell too, albeit looking a little different. In general, to encode OO you

Re: [Haskell-cafe] What I wish someone had told me...

2008-10-14 Thread Jonathan Cast
On Tue, 2008-10-14 at 22:28 +0400, Alexey Romanov wrote: On Tue, Oct 14, 2008 at 9:14 PM, Jonathan Cast [EMAIL PROTECTED] wrote: On Tue, 2008-10-14 at 18:15 +0100, John Lato wrote: Are you advocating introducing existential types to beginning Haskellers? I think something with the scary

Re: [Haskell-cafe] What I wish someone had told me...

2008-10-14 Thread Claus Reinke
I'm not advocating existential types in this case. I rarely use them myself. I was just pointing out that the mechanism for doing the OO thing exists in Haskell too, albeit looking a little different. I don't think there's anything weird about existential types, except an unfamiliar name.

Re: [Haskell-cafe] What I wish someone had told me...

2008-10-14 Thread Daniel Fischer
Am Mittwoch, 15. Oktober 2008 00:34 schrieb Derek Elkins: It's not technically true. Type classes and interfaces a la Java are very fundamentally different neither is remotely capable of doing what the other does. Could you elaborate on that, please? I always understood Java's interfaces to

Re: [Haskell-cafe] What I wish someone had told me...

2008-10-14 Thread Derek Elkins
On Wed, 2008-10-15 at 02:22 +0200, Daniel Fischer wrote: Am Mittwoch, 15. Oktober 2008 00:34 schrieb Derek Elkins: It's not technically true. Type classes and interfaces a la Java are very fundamentally different neither is remotely capable of doing what the other does. Could you

Re: [Haskell-cafe] What I wish someone had told me...

2008-10-14 Thread Albert Y. C. Lai
John Lato wrote: Are you advocating introducing existential types to beginning Haskellers? I think something with the scary name existential quantification would greatly increase the head'splodin' on the learnin' slope. OOP(*) advocates introducing existential types to beginning programmers.

Re: [Haskell-cafe] What I wish someone had told me...

2008-10-14 Thread Janis Voigtlaender
Derek Elkins wrote: On Wed, 2008-10-15 at 05:39 +0800, Lennart Augustsson wrote: I don't think there's anything weird about existential types, except an unfamiliar name. Agreed. I'm extremely tired of the I haven't heard this term therefore it must be 'scary' and complicated and beyond me