From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 73B70BC0A for ; Sun, 10 Dec 2006 10:44:18 +0100 (CET) Received: from fmmailgate03.web.de (fmmailgate03.web.de [217.72.192.234]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id kBA9iIis015432 for ; Sun, 10 Dec 2006 10:44:18 +0100 Received: from smtp06.web.de (fmsmtp06.dlan.cinetic.de [172.20.5.172]) by fmmailgate03.web.de (Postfix) with ESMTP id CF47D4435D68 for ; Sun, 10 Dec 2006 10:44:17 +0100 (CET) Received: from [84.165.171.234] (helo=wiko) by smtp06.web.de with smtp (WEB.DE 4.107 #114) id 1GtLEH-0007rq-00 for caml-list@inria.fr; Sun, 10 Dec 2006 10:44:17 +0100 Message-ID: <004501c71c40$b52e8d00$15b2a8c0@wiko> From: "Andreas Rossberg" To: "caml-list" References: Subject: Re: [Caml-list] Today's inflamatory opinion: exceptions are bad Date: Sun, 10 Dec 2006 10:51:04 +0100 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=response Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2869 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2962 Sender: AndreasRossberg@web.de X-Sender: AndreasRossberg@web.de X-Miltered: at concorde with ID 457BD6F2.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; rossberg:01 enforces:01 erlang:01 erlang:01 ocaml:01 iirc:01 fame:98 wrote:01 imho:01 caml-list:01 andreas:01 andreas:01 thesis:01 exceptions:01 exceptions:01 "Brian Hurt" wrote: > > For the former, returning a variant type ('a option if nothing else) is a > better idea, for (at least) two reasons. One, the type system enforces > the requirement to actually handle the error, at the location the return > value of the function is desired. Want the result? Handle the errors. I guess Joe Armstrong (of Erlang fame) would have to say a lot about how to deal with failure properly. According to him, and the seemingly successful Erlang philosophy (which is, "let it crash"), attempts to locally handle errors are exactly the wrong approach. See his very insightful thesis. > My point here is this: Ocaml is not Java (a fact we should all be > gratefull for, IMHO). Simply because Java and C++ do something, doesn't > mean that it's a good thing to do. Now, ML had exceptions before C++ was even called C++, and one and a half decades before anybody ever heard of Java. In fact, Stroustrup says that C++ exceptions were inspired by ML (too bad he did not take more inspiration from there :) ). ML took the concept from CLU, IIRC, which was a language particularly designed to improve various aspects of large scale software engineering. - Andreas