Towards a more OO Haskell

1999-09-08 Thread Tom Pledger
Michael Hobbs writes: > I have been "scratching a personal itch" lately and was wondering if > anyone else has the same itch. [...] > > [...] it is not possible to create a list of values that may be of > different [Haskell] type, but all implement the same interface. > > [...] Hi. Is i

Re: Towards a more OO Haskell

1999-09-08 Thread Michael Hobbs
Tom Pledger wrote: > Is it common OO programming practice to cast the elements of a > same-interface-different-implementation list, so as to recover the > original objects in full detail? Hmm, that's a bit of gray area, I think. Conceptually speaking, if a function is given a list of Shapes, it s

Re: Towards a more OO Haskell

1999-08-31 Thread Jaewoo Kim
> Many people have said this, but I still haven't found an instance where > existential types are *needed*. For example, if you declare a data type: How about this? Is the following example possibly accepted in any extended Haskell system? class Sequence seq a where empty :: seq a cons :

Re: Towards a more OO Haskell

1999-08-31 Thread Michael Hobbs
Jaewoo Kim wrote: > > > Many people have said this, but I still haven't found an instance where > > existential types are *needed*. For example, if you declare a data type: > > How about this? Is the following example possibly accepted in any extended > Haskell system? > > class Sequence seq a

Re: Towards a more OO Haskell

1999-08-30 Thread Michael Hobbs
Fergus Henderson wrote: > On 27-Aug-1999, Michael Hobbs <[EMAIL PROTECTED]> wrote: > > Those who are into the more esoteric aspects of OO know that an object > > has both a "type" (interface) and a "class" (implementation). > > Yes, but of course Haskell uses those two words in the opposite sense

Re: Towards a more OO Haskell

1999-08-28 Thread Fergus Henderson
On 27-Aug-1999, Michael Hobbs <[EMAIL PROTECTED]> wrote: > Those who are into the more esoteric aspects of OO know that an object > has both a "type" (interface) and a "class" (implementation). Yes, but of course Haskell uses those two words in the opposite sense! In Haskell, a class specifies th

Re: Towards a more OO Haskell

1999-08-28 Thread Josef Sveningsson
On Fri, 27 Aug 1999, Martin Norb{ck wrote: > Fri Aug 27 1999, Michael Hobbs -> > > But to reiterate the point of this message, would anybody be interested > > in a preprocessor that reads in some sort of class/interface definition > > and spits out standard Haskell code, which uses the convention

Re: Towards a more OO Haskell

1999-08-27 Thread Martin Norb{ck
--0F1p//8PRICkK4MW Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Fri Aug 27 1999, Michael Hobbs -> > But to reiterate the point of this message, would anybody be interested > in a preprocessor that reads in some sort of class/interface definition > and sp

Re: Towards a more OO Haskell

1999-08-27 Thread Michael Hobbs
Martin Norb{ck wrote: > Have you looked at Haskell++? > http://www.cs.chalmers.se/~rjmh/Software/h++.html Wasn't aware of its existence. Thanks for the pointer. I'll be sure to look into it. - Michael Hobbs

Towards a more OO Haskell

1999-08-27 Thread Michael Hobbs
I have been "scratching a personal itch" lately and was wondering if anyone else has the same itch. If so, I might spend some time to codify a sort of preprocessor that produces a more OO Haskell. Right now I'm doing all of the transformations by hand, instead of relying on an automated tool. Som