English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

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: 2003-11-19 (21:45)
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. http://www.annexia.org/ http://freshmeat.net/users/rwmj
Merjis Ltd. http://www.merjis.com/ - improving website return on investment
"I wish more software used text based configuration files!"
 -- A Windows NT user, quoted on Slashdot.

To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners