[Haskell-cafe] Collection of objects?
fis at wiwi.hu-berlin.de
Fri Nov 17 13:02:30 EST 2006
this is not exactly what you are looking for, but it contains a link
and then there is the follow-up work to HList, an OO library written
it's quite a challenging read if you just want to go ahead and use
hetero-collections, but it should give you a lot of ideas and
pointers. i think there are also less type-safe alternatives in at
least ghc. is Data.Typeable an interesting thing to look at?
On Fri, Nov 17, 2006 at 06:36:30PM +0100, Valentin Gjorgjioski wrote:
> To: haskell-cafe at haskell.org
> From: Valentin Gjorgjioski <valentin.gjorgjioski at ijs.si>
> Date: Fri, 17 Nov 2006 18:36:30 +0100
> Subject: [Haskell-cafe] Collection of objects?
> Is some kind of collection of object with different types in Haskell
> exist? Except the tuples, which have fixed length.
> I find this
> * Tuples heterogeneous, lists homogeneous.
> * Tuples have a fixed length, or at least their length is encoded in
> their type. That is, two tuples with different lengths will have
> different types.
> * Tuples always finite.
> But I need something which is heterogeneous and non-fixed length. I'm
> used do Java, and this switch to functional languages is very strange to
> me. So, to be clear, I need something like LinkedList<Object> in java.
> Can you please help me or suggest me, what can I use in this case?
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
Institute of Information Systems, Humboldt-Universitaet zu Berlin
e-mail: fis at wiwi.hu-berlin.de
tel: +49 30 2093-5742
fax: +49 30 2093-5741
office: Spandauer Strasse 1, R.324, 10178 Berlin, Germany
pgp: AD67 CF64 7BB4 3B9A 6F25 0996 4D73 F1FD 8D32 9BAA
More information about the Haskell-Cafe