From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.6.10/8.6.6) id OAA27509 for caml-redistribution; Wed, 19 Jun 1996 14:32:08 +0200 Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.6.10/8.6.6) with ESMTP id JAA20217 for ; Wed, 19 Jun 1996 09:04:40 +0200 Received: from imag.imag.fr (imag.imag.fr [129.88.30.1]) by concorde.inria.fr (8.7.1/8.7.1) with ESMTP id JAA27888 for ; Wed, 19 Jun 1996 09:04:40 +0200 (MET DST) Received: from tassili.imag.fr (tassili.imag.fr [129.88.103.15]) by imag.imag.fr (8.6.11/8.6.9) with ESMTP id JAA19492 for ; Wed, 19 Jun 1996 09:04:38 +0200 Received: (from jmfavre@localhost) by tassili.imag.fr (8.6.13/8.6.9) id JAA04855 for caml-list@pauillac.inria.fr; Wed, 19 Jun 1996 09:03:04 +0200 From: "FAVRE Jean-Marie" Message-Id: <9606190903.ZM4853@tassili> Date: Wed, 19 Jun 1996 09:03:01 +0200 X-Mailer: Z-Mail (3.2.1 10oct95) To: caml-list@pauillac.inria.fr Subject: down casting ??? Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: weis the :> operator make possible to coerce an expression from a type t1 to a super type t (this coercion is safe), but how to go from t to t1 ??? (ok, a dynamic check is need, this operation can raise an exception) When one use collections of object, this kind of feature is useful. isn't it ? I first believed that using pattern like (x : t1) -> can do the job, (a kind of typecase construction as it is the case in modula 3). is it possible ??? Jean-marie --