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 LAA26274; Sat, 18 May 2002 11:46:19 +0200 (MET DST) 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 LAA24895 for ; Sat, 18 May 2002 11:46:19 +0200 (MET DST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g4I9kBf23081; Sat, 18 May 2002 11:46:11 +0200 (MET DST) Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id LAA26359; Sat, 18 May 2002 11:46:11 +0200 (MET DST) From: Pierre Weis Message-Id: <200205180946.LAA26359@pauillac.inria.fr> Subject: Re: [Caml-list] Camlp4/OCaml [was: Generating C stubs] In-Reply-To: <200205172137.g4HLbeS21121@sarg.ryerson.ca> from Dave Mason at "May 17, 102 05:37:40 pm" To: dmason@sarg.ryerson.ca (Dave Mason) Date: Sat, 18 May 2002 11:46:11 +0200 (MET DST) Cc: caml-list@inria.fr, dmason@sarg.ryerson.ca X-Mailer: ELM [version 2.4ME+ PL28 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk > Although OCaml is probably my favourite language, I get to program in > Java a fair bit (and Scheme a little, but there the syntax is nice and > regular!). > > The only syntax error I commonly make in OCaml is that I usually > forget to put parens around the exception and its arguments to a raise > function. And the problem is exactly that... the raise FUNCTION. > try...with is syntactic, so why shouldn't raise be a statement instead > of a function? And it wouldn't break many programs (except for a few > unit tests written with FORT). > Then I'd never make any errors in OCaml. :-) > > (In truth, these errors are maybe 10-15% of the type errors I get from > OCaml compilations. And 90% of the `syntax' errors.) You are right. Raise was a keyword in Caml for 10 years, just for the syntactic reasons you mentioned. With Caml Light, simplicity was the rule (remember that we managed to run on a 640 ko PC!). So that raise was turn into a primitive function for sake of simplicity. Afterwards, Objective Caml inherits (:-) that property of raise. In 2002, it may be the time to turn raise into a keyword again to give our beginners and users a more confortable and natural system. > And if we were looking for things to include in the standard OCaml > distribution, I would nominate FORT. Unit testing is very important, > and perhaps we could create a culture that regularly shipped unit-test > with their code (as Java is making progress toward). > > ../Dave I also agree completely with you on the unvaluable importance of program testing (and also program proving, but this much more difficult). We plan to write a test generator for Caml programs. Maxence Guesdon who has industrial experience on testing volonteers on that project. Best regards, Pierre Weis INRIA, Projet Cristal, Pierre.Weis@inria.fr, http://pauillac.inria.fr/~weis/ ------------------- 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