Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: "FAVRE Jean-Marie" <Jean-Marie.Favre@imag.fr>
To: caml-list@pauillac.inria.fr
Subject: down casting ???
Date: Wed, 19 Jun 1996 09:03:01 +0200	[thread overview]
Message-ID: <9606190903.ZM4853@tassili> (raw)


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

-- 





             reply	other threads:[~1996-06-19 12:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-06-19  7:03 FAVRE Jean-Marie [this message]
1996-06-20 17:05 ` Didier Remy
1996-06-20 19:11 ` Jerome Vouillon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9606190903.ZM4853@tassili \
    --to=jean-marie.favre@imag.fr \
    --cc=caml-list@pauillac.inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox