Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-announce] OCamldoc
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2001-10-09 (08:44)
From: Maxence Guesdon <maxence.guesdon@i...>
Subject: [Caml-list] Re: [Caml-announce] OCamldoc

> Congratulations for this very nice piece of work.

> A question about comment placement: isn't it a bit inconsistent to
> expect comments for record fields to be placed *after* the record,
> while the opposite convention is used for object fields?
> I would consider it more consistent to always require the comment to
> precede the element. The purpose of the current convention concerning
> record fields and data constructors seems to be to encourage people
> to write comments that fit on the remainder on the line, which is bad
> practice anyway.
I *agree* that this can be viewed as inconsistency, but i think comments 
for record fields and data constructors are usually quite short, since 
they are a complement to the type comment. Moreover, do you prefer

type t =
   (** constructor 1 *)
   C1 of int
   (** constructor 2 *)
| C2 of float
   (** constructor 3 *)
| C3 of string


type t =
   C1 of int (** constructor 1 *)
| C2 of float (** constructor 2 *)
| C3 of string (** constructor 3 *)


i prefer the second one, which more easily gives me an overview of the 
type. But it's only a matter of taste ;-)

Anyway, thanks for our interest


Bug reports:  FAQ:
To unsubscribe, mail  Archives: