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
Ocaml compiler features
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2007-01-16 (19:24)
From: Edgar Friendly <thelema314@g...>
Subject: Re: [Caml-list] Ocaml compiler features
skaller wrote:
> What about it? C manages to handle all that .. and has no exceptions.
I think the point here is that because OCaml has exceptions (that other
people use, maybe not you), it should also have finally blocks to allow
them to easily do what you do without exceptions.

> But adding 'finally' may not be the best solution,
> the try/let construction looks better to me.
I can't find an example of this.  Something about doing variable binding
as part of the try statement, and then finalizing how?

> But typically I do that kind of
> thing the C way, which is generally the Ocaml way too:
> you propagate return codes from functions using variants
> up call chains.
The OCaml standard library seems to be programmed using exceptions over
variants.  I'll have to say I don't like or use exceptions much, but I'm
forced to by the standard libraries.