From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id OAA01954; Thu, 1 Apr 2004 14:25:05 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id OAA02525 for ; Thu, 1 Apr 2004 14:25:03 +0200 (MET DST) Received: from host1.stonesfair.com (host1.stonesfair.com [208.184.191.145]) by concorde.inria.fr (8.12.10/8.12.10) with ESMTP id i31CP1YM012948 for ; Thu, 1 Apr 2004 14:25:02 +0200 Received: from mev (63-217-154-71.greystoneapts.com [63.217.154.71]) by host1.stonesfair.com (8.12.8/8.12.8) with ESMTP id i31C93dP032499 for ; Thu, 1 Apr 2004 04:09:04 -0800 Received: from ijtrotts by mev with local (Exim 3.35 #1 (Debian)) id 1B8uug-0000bq-00 for ; Wed, 31 Mar 2004 21:38:50 -0800 Date: Wed, 31 Mar 2004 21:38:50 -0800 To: caml-list@inria.fr Subject: Re: [Caml-list] examples of heterogenous collections (containers ?) Message-ID: <20040401053850.GA2260@mev> References: <16490.20296.852406.613011@soggy.deldotd.com> <20040331054113.GC19538@swordfish> <16490.26870.331855.463270@soggy.deldotd.com> <1080723895.13269.143.camel@pelican.wigram> <16491.37831.445677.611426@soggy.deldotd.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <16491.37831.445677.611426@soggy.deldotd.com> User-Agent: Mutt/1.3.28i From: Issac Trotts X-Miltered: at concorde by Joe's j-chkmail ("http://j-chkmail.ensmp.fr")! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 issac:01 trotts:01 ijtrotts:01 2004:99 elt:01 elt:01 issac:01 trotts:01 ocaml:01 signatures:02 ucdavis:02 objects:02 wrote:03 cast:04 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk X-Status: X-Keywords: X-UID: 13 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