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 (09:00)
From: tab@s...
Subject: Re: [Caml-list] Ocaml compiler features
On Tue, Jan 16, 2007 at 12:18:11PM +1100, skaller wrote:
> I don't miss any of those things .. the point being they're 
> not so 'common' as you might think.

It's totally common to to do some action despite that an exception has
been raised or not to cleanup stuff (like file descriptor is the obvious

At the moment in OCaml you need to multiple layer or try/with to be able
to express this. it would be much nicer to allow this construction as a
proper idiom, not ad-hoc.

> I'm a Python programmer too, and I never use 'finally' ..
> I've never found any use for it.

You probably don't write/read much python code then.

( I found 2 use of finally in felix's python code )

> Felix has return statement .. but then Felix has *statements*:
> executable Ocaml is all expressions, so a return statement would
> seem out of place.

OCaml is a functional language, however it also contains imperative feature.

It doesn't seems so inappropriate to have a return statement, as long
it's not abused.

Vincent Hanquez