Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] Generating C stubs
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Pierre Weis <pierre.weis@i...>
Subject: Re: [Caml-list] Camlp4/OCaml [was: Generating C stubs]
> 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