Browse thread
[Caml-list] single-line comment request
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Michal Moskal <malekith@p...> |
| Subject: | Re: [Caml-list] single-line comment request |
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