Browse thread
Re: [Caml-list] Re: [Caml-announce] OCamldoc
- Benjamin C. Pierce
[
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: | Benjamin C. Pierce <bcpierce@s...> |
| Subject: | Re: [Caml-list] Re: [Caml-announce] OCamldoc |
> > Is there *anyone* that wants to write
> >
> > (* Comment for f *)
> > val f : t
> > (* Comment for g *)
> > val g : t'
>
> You mean, anyone who normally, when writing programs, either puts the
> comment before the thing being commented, or
>
> val f : t (* Comment for f *)
> val g : t' (* Comment for g *)
>
> on the same line as the thing being commented?
No, I meant, anyone who writes comments before the thing that they refer
to *and* indented more than the thing that follows them.
My proposed rule
if the comment is on a line by itself,
then if its indentation is the same as the following (non-comment) line
then it goes with the following
else it goes with the preceding
else it goes with the line it's on.
handles your style just fine, I think. The idea was to support all three
"natural" styles, i.e.
(** comment for f *)
val f : t
val f : t (** comment for f *)
val f : t
(** comment for f *)
without the need for any funny markers.
B
-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr