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 TAA11518; Tue, 29 Jun 2004 19:56:58 +0200 (MET DST) 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 TAA11507 for ; Tue, 29 Jun 2004 19:56:56 +0200 (MET DST) Received: from outbound28-2.lax.untd.com (outbound28-2.lax.untd.com [64.136.28.160]) by nez-perce.inria.fr (8.12.10/8.12.10) with SMTP id i5THurEV004097 for ; Tue, 29 Jun 2004 19:56:54 +0200 Received: from outbound28-2.lax.untd.com (smtp02.lax.untd.com [10.130.24.122]) by smtpout02.lax.untd.com with SMTP id AABAQDML6AS4HBYJ for (sender ); Tue, 29 Jun 2004 10:56:44 -0700 (PDT) Received: (qmail 19345 invoked from network); 29 Jun 2004 17:55:44 -0000 Received: from unknown (HELO vangogh) (66.42.38.75) by smtp02.lax.untd.com with SMTP; 29 Jun 2004 17:55:44 -0000 From: "Brandon J. Van Every" To: "caml" Subject: RE: [Caml-list] Exceptions considered harmful Date: Tue, 29 Jun 2004 11:05:45 -0700 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 Importance: Normal X-ContentStamp: 13:6:1492902153 X-UNTD-OriginStamp: CI84cOLHFqh7Zd2QWkwvEFvwyO3T/pIsPQZphDk9MRhNF1B0F2Pppe6ichh5sCm5 X-Miltered: at nez-perce with ID 40E1AD65.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; brandon:99 caml-list:01 worn:99 wage:99 policies:99 policies:99 whining:01 delegating:01 api:01 api:01 nickel:99 caml-list:01 bayesian:01 crap:01 crap:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk skaller wrote: > > Any comments on any of this appreciated. Being worn out from a dismal weekend of sub minimum wage signature gathering (HOW can I get pa-id for my actual computer interests?) I did not follow your logic too closely. It seemed to me that to partially resolve your issues, whatever is thrown must simply carry a lot more information about context, type of error, etc. Many languages allow typed information to be thrown, for instance, C++. I'm still a noob at OCaml; I thought it could do that sort of thing. I say 'partially' because exception handling is always a policy decision. You simply cannot get away from crafting policies about what to do when something doesn't work. The problem is, do you have the implementation time to craft those policies? I usually don't. It takes me 6 times to get any design correct, and I do not want to spend a pile of design time on error conditions when I know the code may very well be thrown out anyways. If you pass the buck to the next level up, then you have a 'whiney API'. If you're the boss of a company, do you really want tons of workers whining about every little thing, saying "I've failed! I don't know what to do! Can you handle this for me? Pleeeze??" No, you'd fire 'em. They're supposed to be doing jobs; you're supposed to be delegating jobs to them, to hide the complexity of your corporate operations. You want answers, not more problems. Sadly, I think exception handling is only a valid approach to software engineering once an API is reaching 'maturity'. One really should just go back into it and rigidly define what's gonna happen when all of the well-understood design parameters are violated. As an alternative, one could code very cautiously, at a snail's pace. You could ensure that exceptions are always thrown, even if nobody knows how to use the API yet and it's fundamentally 'in flux'. In an industrial context on someone else's nickel, that might be the way to go. But I certainly can't afford it in my own development. Cheers, www.indiegamedesign.com Bran-don Van Every Se-attle, WA Praise Be to the caml-list Bayesian filter! It blesseth my postings, it is evil crap! evil crap! evil crap! ------------------- 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