Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] examples of heterogenous collections (containers ?)
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Issac Trotts <ijtrotts@u...>
Subject: Re: [Caml-list] examples of heterogenous collections (containers ?)
On Wed, Mar 31, 2004 at 08:00:07PM -0800, briand@aracnet.com wrote:
> let the_list = [ new elt; new elt ; ((new elt_A) :> elt) ]

I wish I understood why this cast is necessary.  It seems like OCaml
should be able to construct a class type whose method signatures 
are the ones common to all objects in the list.  

--
Issac Trotts

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners