caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Basile STARYNKEVITCH <basile@starynkevitch.net>
To: mcharity@vendian.org
Cc: caml-list@inria.fr
Subject: [Caml-list] Exceptions and C
Date: Fri, 6 Dec 2002 21:21:39 +0100	[thread overview]
Message-ID: <15857.1747.608762.636810@hector.lesours> (raw)
In-Reply-To: <200212061840.gB6Iehc17706@vendian.org>

>>>>> "Mitchell" == Mitchell N Charity <mcharity@vendian.org> writes:

    Mitchell> I gather run-time type checking is not occurring.  Can I
    Mitchell> at least count on avoiding a segfault, or is behavior
    Mitchell> completely undefined if callback arguments are
    Mitchell> incorrectly typed?

Behavior is undefined. For details, read the Chapter 18 "Interfacing C
with Objective Caml" of the reference manual. To understand what is
happening, read the section 18.2 (the value type) - or read the source
of the runtime system.

And there is a reason for that. The whole philosophy of Ocaml is
static typing, which the OCaml team pushes to the extreme (for
instance by refusing dynamic casting or class checking for objects).

I miss more dynamic ability of the object part of Ocaml (even if this
means having a tree of classes, not a forest, and reject multiple
inheritance).



-- 

Basile STARYNKEVITCH         http://starynkevitch.net/Basile/ 
email: basile<at>starynkevitch<dot>net 
alias: basile<at>tunes<dot>org 
8, rue de la Faïencerie, 92340 Bourg La Reine, France
-------------------
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


      reply	other threads:[~2002-12-06 20:21 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-12-06 18:40 Mitchell N Charity
2002-12-06 20:21 ` Basile STARYNKEVITCH [this message]

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=15857.1747.608762.636810@hector.lesours \
    --to=basile@starynkevitch.net \
    --cc=caml-list@inria.fr \
    --cc=mcharity@vendian.org \
    /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).