From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by pauillac.inria.fr; Mon, 30 May 94 11:09:34 +0200 Received: from margaux.inria.fr by pauillac.inria.fr; Sat, 28 May 94 12:37:52 +0200 Received: from concorde.inria.fr by margaux.inria.fr, Sat, 28 May 1994 12:37:51 +0200 Received: from stroma.dcs.ed.ac.uk (mmdf@stroma.dcs.ed.ac.uk [129.215.160.108]) by concorde.inria.fr (8.6.9/8.6.9) with SMTP id MAA24684 for ; Sat, 28 May 1994 12:37:51 +0200 Received: from colonsay.dcs.ed.ac.uk by dcs.ed.ac.uk id aa22942; 28 May 94 11:36 BST Date: Sat, 28 May 94 11:36:02 BST Message-Id: <13319.9405281036@colonsay.dcs.ed.ac.uk> From: Christophe Raffalli Sender: weis@pauillac.inria.fr To: Chet.Murthy@inria.fr Cc: Judicael.Courant@lip.ens-lyon.fr, caml-list@margaux.inria.fr In-Reply-To: <29270.770120172@pauillac.inria.fr> (Chet.Murthy@inria.fr) Subject: Irrelevant variables in patterns >>>La solution serait plutot de fournir un warning lorsque l'on capture toutes >>>les exception, car cela est un bug dans 99% des cas (on ne veut pas attraper >>>Catch_break ou Out_of_memory en general). >But that doesn't work if I have 10 different exceptions in my program >- I am unwilling to write 10-way branches, as are most programmers. >Exceptions in ML are a programming mechanism. They are not used >anymore for exceptional conditions. We need a new mechanism for that. >--chet-- Ok, but as long as "Out_of_memory" and "catch_break" are exceptions, if you don't write the ten cases, this is likely to be a bug !! Moreover, if you need to catch an exception, it means you want to do something with it, which is in general specific to this exception. So you have to write all the branches in most cases (the syntax "A | B | C ->" is then very usefull). Furthermore, I just asked for a warning ! this would catch the attention of the programmer on a likely bug. but if he knowns what he is doing, he is free to do so. Christophe.