Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] Quotes in comments: (* " *)
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Richard Jones <rich@a...>
Subject: Re: [Caml-list] Quotes in comments: (* " *)
I've had a few replies along the lines that "(*" or "*)" is valid
code, and hence all this quoting comments stuff is justified.  I have
to say that writing such code is amazingly rare (perhaps only compiler
writers will write this, and then only once in their lives), whereas
I've encountered the problems with quotes in comments routinely since
I started using OCaml.  I doubt I'm alone in this.  I actually have
a small collection of programs now which have lines like this:

  (* ... some comment which contains an odd number of quotes ...

  [Keep OCaml compiler happy -->] " *)

I think the behaviour is counter-intuitive, and should be classified
as a bug, along with the other annoyance of being unable to write
let f = printf "** %i" and have it do what you expect.

Rich.

-- 
Richard Jones. http://www.annexia.org/ http://freshmeat.net/users/rwmj
Merjis Ltd. http://www.merjis.com/ - improving website return on investment
Learning Objective CAML for C, C++, Perl and Java programmers:
http://www.merjis.com/richj/computers/ocaml/tutorial/