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 MAA10129; Wed, 19 Nov 2003 12:44:40 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id MAA09342 for ; Wed, 19 Nov 2003 12:44:38 +0100 (MET) Received: from mail.dcs.qmul.ac.uk (vicar.dcs.qmul.ac.uk [138.37.88.163]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id hAJBic104605 for ; Wed, 19 Nov 2003 12:44:38 +0100 (MET) Received: from xenografia.plus.com ([212.159.85.26] helo=dcs.qmul.ac.uk) by mail.dcs.qmul.ac.uk with asmtp (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.24) id 1AMQl9-00036p-G7; Wed, 19 Nov 2003 11:44:35 +0000 Message-ID: <3FBB5784.9040303@dcs.qmul.ac.uk> Date: Wed, 19 Nov 2003 11:44:04 +0000 From: Martin Berger User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.1) Gecko/20031009 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Brian Hurt CC: Caml Mailing List Subject: Re: [Caml-list] GC and file descriptors References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Auth-User: martinb X-DCS-Spam-Score: -3.0 X-clamav-result: clean (1AMQl9-00036p-G7) X-uvscan-result: clean (1AMQl9-00036p-G7) X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 bug:01 debugging:01 debugging:01 untyped:01 fledged:01 annotations:01 compiler:01 debug:01 debug:01 compilers:01 descriptors:01 int:01 int:01 checking:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Brian Hurt wrote: > The single change the programmer would have to make in this case is to add > a new error case that is not being handled. In which case the compiler is > being nice and telling you all the places where you need to think about > how to handle this new error case. this can be immensely useful, but also very infuriating, depending on where you are in the software development cycle. imagine having 100000 lines of code, mostly mature, and you are trying to track down a little bug. for that you want to see with what arguments the function let f m n = body;; is called. assume that function has the type f : int -> ( int -> A throws E ) throws E so for debugging you modify f to let f m n = print_debug "calling f with arguments " m n; body if print_debug may throw something not in E and if f is used all over your code, you will have make an enourmous of changes (and later revert them) just to get a silly little debugging mechanism going. i would hate having to do this. being able to switch off exception would be a great help in this situation. being able to switch on or off exception checking is just an instance of a more general phenomenon where you run different checks on your software independently of each other. i expect future compilers to be more flexible in this regard, maybe offering plug-in typing systems from untyped to fully fledged dependent types and proof annotations. martin ------------------- 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