<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE message PUBLIC
  "-//MLarc//DTD MLarc output files//EN"
  "../../mlarc.dtd"[
  <!ATTLIST message
    listname CDATA #REQUIRED
    title CDATA #REQUIRED
  >
]>

  <?xml-stylesheet href="../../mlarc.xsl" type="text/xsl"?>


<message 
  url="2002/12/dc088b981df0d96498a14857f400b381"
  from="Basile STARYNKEVITCH &lt;basile@s...&gt;"
  author="Basile STARYNKEVITCH"
  date="2002-12-06T20:21:45"
  subject="[Caml-list] Exceptions and C"
  prev="2002/12/4555ce883e1f38c5fb439263eaeb6d6b"
  next="2002/12/5581c0bd84fc85a1433cc7954b60ed48"
  prev-in-thread="2002/12/4555ce883e1f38c5fb439263eaeb6d6b"
  prev-thread="2002/12/aea498f4b382c4c38c55ec6bcfe788a7"
  next-thread="2002/12/2deaecb005361aa08c2faca67fcaa675"
  root="../../"
  period="month"
  listname="caml-list"
  title="Archives of the Caml mailing list">

<thread subject="[Caml-list] Exceptions and C">
<msg 
  url="2002/12/4555ce883e1f38c5fb439263eaeb6d6b"
  from="Mitchell N Charity &lt;mcharity@v...&gt;"
  author="Mitchell N Charity"
  date="2002-12-06T20:07:02"
  subject="[Caml-list] Exceptions and C">
<msg 
  url="2002/12/dc088b981df0d96498a14857f400b381"
  from="Basile STARYNKEVITCH &lt;basile@s...&gt;"
  author="Basile STARYNKEVITCH"
  date="2002-12-06T20:21:45"
  subject="[Caml-list] Exceptions and C">
</msg>
</msg>
</thread>

<contents>
&gt;&gt;&gt;&gt;&gt; "Mitchell" == Mitchell N Charity &lt;mcharity@vendian.org&gt; writes:

    Mitchell&gt; I gather run-time type checking is not occurring.  Can I
    Mitchell&gt; at least count on avoiding a segfault, or is behavior
    Mitchell&gt; completely undefined if callback arguments are
    Mitchell&gt; 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&lt;at&gt;starynkevitch&lt;dot&gt;net 
alias: basile&lt;at&gt;tunes&lt;dot&gt;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

</contents>

</message>

