[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: ocamlsdl, exceptions not registered



Hi,

On Tue, Jun 19, 2012 at 10:21 AM, Stéphane Glondu <glondu@debian.org> wrote:
> Le 18/06/2012 21:21, Florent Monnier a écrit :
>>>> Even if it's an ocaml bug, don't you think that we should try to do
>>>> something? [...]
>>>> Please tell-me what you think.
>>>
>>> I don't consider this a bug, merely an unfortunate (and "well known" :)
>>> behaviour.

yes, it's not really an ocaml "bug" (probably never going to be
"fixed"), more of a quirk.
It's rarely a problem when you have an obvious entry point to the
module (such as Sdl.init) that can be
declared as val in the .mli. But in ocamlsdl almost each module has
its own exception ...

> I forgot to mention the obvious fix: leave externals abstract in .mli
> files (i.e. put "val" instead of "external"). My guess is that it will
> have a small impact in bytecode, but not in native code if .cmx are kept.

ah indeed, if the .cmx is kept there is no penalty. I didn't know
this, that's great !
Then turning all "external" in the .mli to "val" is clearly the better
option then.

-- 
  Olivier


Reply to: