tags:

views:

153

answers:

1

I'm learning ML, with the SML/NJ dialect. What I'm trying to figure out is if there is a line comment operator. I found the block comment operator, (* ... *), but I really miss line comments.

Suggestions? Or am I just stuck with block comments?

+4  A: 

You're stuck with block comments.

On the other hand, block comments can be nested: (* (* *) still comment here *)

Victor Nicollet
This makes me sad, but oh well. And the nested comments are cool, thanks.
icco
For the record, that depends on your compiler/interactive environment. According to the spec, a comment may not contain the substring "*)", so you should avoid it even if some implementations are lenient.
Nicholas Wilson
@Nicholas Wilson: you are right, I got things mixed up with OCaml (http://caml.inria.fr/pub/docs/manual-ocaml/lex.html).
Victor Nicollet