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 VAA25097; Tue, 21 May 2002 21:15:32 +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 VAA25244 for ; Tue, 21 May 2002 21:15:31 +0200 (MET DST) X-SPAM-Warning: Sending machine is listed in blackholes.five-ten-sg.com Received: from athlon.baretta.com (r-mi214-6a133.tin.it [62.211.4.133]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g4LJFTX22739 for ; Tue, 21 May 2002 21:15:29 +0200 (MET DST) Received: from baretta.com (localhost.localdomain [127.0.0.1]) by athlon.baretta.com (Postfix) with ESMTP id 146D9273A7 for ; Tue, 21 May 2002 00:59:34 +0200 (CEST) Message-ID: <3CE97FD5.6000606@baretta.com> Date: Tue, 21 May 2002 00:59:33 +0200 From: Alessandro Baretta Organization: Baretta srl -- www.baretta.com User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0rc1) Gecko/20020417 X-Accept-Language: it, en MIME-Version: 1.0 To: Ocaml Subject: Re: [Caml-list] Camlp4/OCaml [was: Generating C stubs] References: <200205171432.QAA11555@pauillac.inria.fr> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Pierre Weis wrote: >>FAIW, let me say I'm shedding blood to make my code compile >>when I raise exceptions that have non banal type lists: I >>always misplace my parentheses. > > > Have you ever read the programming guidelines that explain the > ``secrets'' of Caml parentheses ? > > http://pauillac.inria.fr/caml/FAQ/pgl-eng.html > > Section IV: When to use parentheses within an expression > > If you learn the rules, if you follow those guidelines, and still > experience problems, please let me know, since I used those simple > principles for years with thousands of students (I really mean several > thousands students not several students) and they had no problems once > they had understood and learned those rules. Thanks for mentioning them. All the documentation I have on Ocaml now is the "official" html manual, but the syntax part is not human-readable. I was never actually taught Ocaml, but rather I learned it (if I ever did) by writing code and trying to get it to compile. I never had problems figuring out the meaning and usage of type lists in constructors, with the sole exception of exceptions. Somehow, they have always escaped my inductive learning ability. I'll try reading the guidelines. > On the other hand, I agree with you that if you don't know the rules > for parens in Caml, you certainly should have problems to write your > programs. This is the same problems as the one of young people at > school that use to claim that mathematics _HAVE_ (*) syntactic > problems because they never know where to put parens in I have absolutely no authority to criticize the syntax; I just claim that some aspects of it are not user-friendly. Math transcends user-friendliness. It simply is not meant to be used in any definite way. It just sits there, exists. (I once heard an algebraist wonder if category theory had any *real* use.) Software systems, on the other hand, must be used by humans in order to be worth creating, and, for this reason, they ought to be as intuitive as possible. I still have not had time to mess with CamlP4 and cannot say much about it, but if its syntax is more intuitive than the native one, then welcome CamlP4. Regards, Alex Baretta ------------------- 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