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] GC and file descriptors
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Richard Jones <rich@a...>
Subject: Re: [Caml-list] GC and file descriptors
> >This is the problem with checked exceptions in Java: the set of
> >exceptions that can be thrown is an implementation detail which is
> >exposed unnecessarily through the API.
> IMO it is part of the interface, just like the return type of the
> functions.

I think in academia you can say these things. But on the sprawling
real projects, badly managed, written by poorly skilled programmers,
checked exceptions are a really bad idea. (Trust me on this one, I've
worked on several such projects).

I don't agree with his point of view on strong typing .. but then he's
coming from a Java background, so what do you expect?

HOWEVER, if I don't have to write .mli files (ie. if I don't have to
tediously define what all my functions throw), then guess what: I
think checked exceptions, infered automatically by the compiler, could
actually be a really GOOD idea. But it looks like this would require a
major change to the language - ie. getting rid of .mli files
altogether and adding the 'public' / 'abstract' keywords to the .ml
files as described by, I think, Brian Hurt in another thread.


Richard Jones.
Merjis Ltd. - improving website return on investment
"I wish more software used text based configuration files!"
 -- A Windows NT user, quoted on Slashdot.

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: