From: skaller <skaller@users.sourceforge.net>
To: Ted Kremenek <kremenek@cs.stanford.edu>
Cc: david.baelde@ens-lyon.org, Ocaml <caml-list@inria.fr>
Subject: Re: [Caml-list] Class/prototype-based OO
Date: Tue, 29 Aug 2006 15:53:11 +1000 [thread overview]
Message-ID: <1156830791.5147.144.camel@rosella.wigram> (raw)
In-Reply-To: <E1E927D0-2415-4F81-9F1E-18DAC01A1BC1@cs.stanford.edu>
On Mon, 2006-08-28 at 20:11 -0700, Ted Kremenek wrote:
> While the structural typing in Ocaml is wonderful (I really love it),
> there are missing features of the OO system in OCaml that can be
> particularly bothersome, and are worth considering when comparing the
> OO features of Ocaml with other languages (including those that use
> nominal typing).
>
> For example, from what I can tell it appears that Ocaml lacks real
> support for "downcasts" in the language, which require run-time type
> information (RTTI) and run-time checks.
Yes, indeed, this is wonderful! For the first time programmers
learn the truth.
Ocaml does not pander to the false god of Object Orientation.
> In the context of structural
> typing, I am talking about "casting" an object with a type with a
> given set of method signatures to another type with an extended set
> of method signatures.
There is no need. Use the proper technology: variants.
They provide run time type information on which you can
dispatch.
--
John Skaller <skaller at users dot sf dot net>
Felix, successor to C++: http://felix.sf.net
next prev parent reply other threads:[~2006-08-29 5:53 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-25 7:51 David Baelde
2006-08-25 11:31 ` [Caml-list] " skaller
2006-08-29 3:11 ` Ted Kremenek
2006-08-29 5:53 ` skaller [this message]
2006-08-30 23:57 ` brogoff
2006-08-29 12:03 ` Gerd Stolpmann
2006-08-29 17:56 ` Ted Kremenek
2006-08-29 18:13 ` Ted Kremenek
2006-08-31 1:11 ` Jacques Garrigue
2006-08-31 5:18 ` skaller
2006-08-31 6:36 ` Jacques Garrigue
2006-08-31 7:15 ` skaller
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=1156830791.5147.144.camel@rosella.wigram \
--to=skaller@users.sourceforge.net \
--cc=caml-list@inria.fr \
--cc=david.baelde@ens-lyon.org \
--cc=kremenek@cs.stanford.edu \
/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