Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] Exceptions and C
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Basile STARYNKEVITCH <basile@s...>
Subject: [Caml-list] Exceptions and C
>>>>> "Mitchell" == Mitchell N Charity <> 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


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 Archives:
Bug reports: FAQ:
Beginner's list: