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 XAA28402; Tue, 8 Apr 2003 23:39:11 +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 XAA28377 for ; Tue, 8 Apr 2003 23:39:09 +0200 (MET DST) Received: from ep09.kernel.pl (ep09.kernel.pl [212.87.11.162]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id h38Ld8905289 for ; Tue, 8 Apr 2003 23:39:08 +0200 (MET DST) Received: (qmail 18887 invoked by uid 566); 8 Apr 2003 21:39:03 -0000 Date: Tue, 8 Apr 2003 23:37:35 +0200 From: Michal Moskal To: Brian Hurt Cc: Basile STARYNKEVITCH , caml-list@inria.fr Subject: Re: [Caml-list] single-line comment request Message-ID: <20030408213735.GA3061@roke.freak> References: <16019.8785.629.951518@hector.lesours> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.1i X-PGP-Fingerprint: CF89 1B14 11BE 1CC9 2CA3 7497 5E32 69B4 BC71 B4C2 X-AntiVirus: scanned for viruses by AMaViS 0.2.1 (http://amavis.org/) X-Spam: no; 0.00; michal:01 moskal:01 malekith:01 pld-linux:01 caml-list:01 basile:01 execve:01 usr:01 ocamlc:01 recognizes:01 debugging:01 wroclaw:01 bin:01 kernel:01 ocaml:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Tue, Apr 08, 2003 at 03:22:59PM -0500, Brian Hurt wrote: > On Tue, 8 Apr 2003, Basile STARYNKEVITCH wrote: > > > I also suggest the following di-graph for comments > > #! (which is compatible with Unix first line execve convention) > > Aha! OK- here is a really good reason to add single line comments, with > #! as the comment delimiter- so we can put > #!/usr/local/bin/ocaml > as the first line in our programs, and have Ocaml as an interpreted > scripting language, as well as a interpreter/bytecode/native language. ocaml (as opposed to ocamlc) recognizes this as comment, but only at the first line of a file. > All of the above are valid operator names. Not sure about [*]. See page > 91 of the language standard. Neither [*] nor #! are accepted by ocamlc as operator names. I personally would find single line comments useful for turning various debugging (single line) calls on/off, e.g.: f (); (* dbg "f done"; *) let i = g () in dbg "g done, %d" i; h () But I don't care much, just need to write vim macro :-) -- : Michal Moskal :: http://www.kernel.pl/~malekith : GCS {C,UL}++++$ a? !tv : PLD Linux ::::::::: Wroclaw University, CS Dept : {E-,w}-- {b++,e}>+++ h ------------------- 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