From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id WAA13873; Wed, 19 Nov 2003 22:45:06 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id WAA04993 for ; Wed, 19 Nov 2003 22:45:05 +0100 (MET) Received: from aomori.annexia.org (annexia.force9.co.uk [212.56.101.183]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id hAJLj4109604 for ; Wed, 19 Nov 2003 22:45:04 +0100 (MET) Received: from rich by aomori.annexia.org with local (Exim 3.36 #1 (Debian)) id 1AMa8G-0004u4-00 for ; Wed, 19 Nov 2003 21:45:04 +0000 Date: Wed, 19 Nov 2003 21:45:03 +0000 Cc: Caml Mailing List Subject: Re: [Caml-list] GC and file descriptors Message-ID: <20031119214503.GA18822@redhat.com> References: <20031119165408.GA16427@redhat.com> <6F407D14-1AB4-11D8-8941-00039310CAE8@inria.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6F407D14-1AB4-11D8-8941-00039310CAE8@inria.fr> User-Agent: Mutt/1.5.4i From: Richard Jones X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 api:01 mli:01 mli:01 freshmeat:01 ltd:98 compiler:01 descriptors:01 thread:02 typing:03 interface:03 badly:03 exceptions:04 exceptions:04 academia:04 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk > >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). http://www.mindview.net/Etc/Discussions/CheckedExceptions 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. Rich. -- 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