caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Richard Jones <rich@annexia.org>
To: caml-list <caml-list@inria.fr>
Subject: Re: [Caml-list] Re: OCAML Downcasting?
Date: Wed, 22 Sep 2004 11:29:59 +0100	[thread overview]
Message-ID: <20040922102959.GA21645@annexia.org> (raw)
In-Reply-To: <87d60eizlh.fsf@qrnik.zagroda>

[-- Attachment #1: Type: text/plain, Size: 1654 bytes --]

On Wed, Sep 22, 2004 at 08:31:38AM +0200, Marcin 'Qrczak' Kowalczyk wrote:
> skaller <skaller@users.sourceforge.net> writes:
> 
> >> Attempts to avoid downcasts are often unmodular, they require to
> >> specify all possible variants in one place.
> >
> > It makes no difference. You have do specify them all anyhow,
> > downcast or not.
> 
> It makes a difference because specifying them at the type definition
> would introduce a dependency loop between modules. And it would be
> unmodular: it would require changing some base module whenever a far
> client module is added.

I've tended to stop using and thinking in OO terms since starting to
use OCaml.  In particular, when I need a data structure of some sort,
I just use a data structure (tuple, struct, variant whatever).  Before
coming to OCaml, data structure implied "class" for me.

The advantage to me is that now when I change the data structure the
compiler catches all the places in the code which I need to change, so
I go through and methodically change them.

But the OCaml assumption here is that you program is one big
monolithic entity, for which you have source (and are recompiling) all
parts.  This goes against the OO theory of "reuse" - particularly of
reuse of binary classes, which I don't think I've ever actually used
in practice anyway.

Rich.

-- 
Richard Jones. http://www.annexia.org/ http://www.j-london.com/
Merjis Ltd. http://www.merjis.com/ - improving website return on investment
NET::FTPSERVER is a full-featured, secure, configurable, database-backed
FTP server written in Perl: http://www.annexia.org/freeware/netftpserver/

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

  parent reply	other threads:[~2004-09-22 10:30 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <ci7tcf$qqf$1@wolfberry.srv.cs.cmu.edu>
     [not found] ` <ci9ggm$i6p$1@wolfberry.srv.cs.cmu.edu>
2004-09-21  8:03   ` Jacques GARRIGUE
2004-09-21  8:43     ` Damien Pous
2004-09-21  9:15       ` Jacques GARRIGUE
2004-09-21  9:29         ` skaller
2004-09-21  9:49           ` Jacques GARRIGUE
2004-09-21  9:34         ` Stefano Zacchiroli
2004-09-21  9:56           ` Jacques GARRIGUE
2004-09-21 19:27     ` Michael Vanier
2004-09-21 21:38       ` Brian Hurt
2004-09-21 22:06         ` Michael Vanier
2004-09-21 22:32           ` Brian Hurt
2004-09-22  1:04           ` skaller
2004-09-21 22:20         ` Marcin 'Qrczak' Kowalczyk
2004-09-22  2:26           ` skaller
2004-09-22  6:31             ` Marcin 'Qrczak' Kowalczyk
2004-09-22  9:03               ` sejourne_kevin
2004-09-22 10:29               ` Richard Jones [this message]
2004-09-22 18:39                 ` Brian Hurt
2004-09-22 10:50               ` skaller
2004-09-22 12:03               ` Alain Frisch
2004-09-22 12:50               ` Cláudio Valente
2004-09-22 13:15                 ` Marcin 'Qrczak' Kowalczyk
2004-09-22 15:50                   ` skaller
2004-09-22 18:42               ` Brian Hurt
2004-09-22 18:44                 ` Marcin 'Qrczak' Kowalczyk
2004-09-22 19:18                   ` Brian Hurt
2004-09-22  0:50         ` skaller
2004-09-22  1:30       ` Jacques GARRIGUE
2004-09-22  2:59         ` 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=20040922102959.GA21645@annexia.org \
    --to=rich@annexia.org \
    --cc=caml-list@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;
as well as URLs for NNTP newsgroup(s).