caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Frank Atanassow <franka@cs.uu.nl>
To: bcpierce@cis.upenn.edu
Cc: Francois.Pottier@inria.fr, caml-list@pauillac.inria.fr
Subject: Re: [Caml-list] Re: [Caml-announce] OCamldoc
Date: Sun, 14 Oct 2001 14:50:04 +0200	[thread overview]
Message-ID: <20011014145004.B3057@cs.uu.nl> (raw)
In-Reply-To: <19083.1002973746@saul.cis.upenn.edu>; from bcpierce@saul.cis.upenn.edu on Sat, Oct 13, 2001 at 07:49:06AM -0400

Benjamin C. Pierce wrote (on 13-10-01 07:49 -0400):
> (I'm glad we've had
> so much discussion about it, though, because now people will think twice
> before proposing *more* funny characters to go in comments... :-)

Whoa, hold on there! You haven't heard my proposal yet:

I think we should have documentation comments of the form

  (*<r1> ... <r2>*)

where r1 and r2 are REGULAR EXPRESSIONS which match the part of the source
that the documentation applies to. This covers all the possible cases, plus
MANY MORE. Not only can you have the comment BEFORE, on THE SAME LINE and
AFTER but also IN THE MIDDLE of your code! Just think of all the possibilities
for SELF-EXPRESSION and CUSTOMIZATION. No more WORRIES or CONSTERNATION about
finding the right spot: just put it ANYWHERE.

Some people might argue against this because it is overly complicated, and you
would have to change the regular expressions if you move the comment, but THAT
IS WHAT O'REILLY BOOKS AND PROGRAMMABLE EDITORS ARE FOR!  In fact, I can
imagine a whole INDUSTRY growing out of this. Think of the BUSINESS
OPPORTUNITIES, an entire NEW MARKET. I urge you ALL to GET IN ON THE GROUND
FLOOR NOW, before you MISS OUT!!!!

[I wonder how many people's spam filters got triggered on this... <gulp!>]

Seriously though, my preferences are, in order:

  1) only (** ... *) comments preceding the code, as in Java;
  2) Benjamin's indentation-significant style
  3) Jerome's (** ... *) and (* ... **) comments

My reasoning is that 1) is best because, since this is a new feature and no
one is forced to use it, it's not unreasonable to expect people to stylize
their documentation comments according to a single, new convention which is,
anyway, familiar from Java. 2) is better than 3) for the reason Benjamin
mentioned already: if you move the comment, you have to remember to change the
asterisks, and that seems pretty error-prone to me.

Someone argued that significant indentation is a burden for source
preprocessors as they need to preserve the indentation exactly. I don't
find this so convincing since preprocessor _output_ is usually not meant for
human eyes at all, but rather for the compiler. Usually you will run CamlDoc
on the preprocessor _input_, right? A preprocessor could even just convert
all the documentation comments to regular comments if it didn't want to
produce misleading output.

-- 
Frank Atanassow, Information & Computing Sciences, Utrecht University
Padualaan 14, PO Box 80.089, 3508 TB Utrecht, Netherlands
Tel +31 (030) 253-3261 Fax +31 (030) 251-379
-------------------
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


  parent reply	other threads:[~2001-10-14 12:50 UTC|newest]

Thread overview: 54+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-10-09 12:30 Dave Berry
2001-10-10 11:08 ` Benjamin C. Pierce
2001-10-10 13:33   ` Sven
2001-10-10 14:10     ` Jacques Garrigue
2001-10-12  6:23       ` Francois Pottier
2001-10-12  6:50         ` Daniel de Rauglaudre
2001-10-10 15:12     ` Benjamin C. Pierce
2001-10-10 15:25       ` Stefano Lanzavecchia
2001-10-10 15:39         ` Benjamin C. Pierce
2001-10-10 15:44           ` Stefano Lanzavecchia
2001-10-10 18:45           ` Maxence Guesdon
2001-10-10 19:38             ` Benjamin C. Pierce
2001-10-11  7:23               ` Florian Hars
2001-10-12  6:28             ` Francois Pottier
2001-10-12  9:10             ` Sven
2001-10-12  9:39               ` Markus Mottl
     [not found]             ` <9q7886$2p8$1@qrnik.zagroda>
2001-10-13  9:19               ` Marcin 'Qrczak' Kowalczyk
2001-10-10 15:36       ` Thorsten Ohl
2001-10-10 17:10       ` Patrick M Doane
2001-10-10 19:39         ` Benjamin C. Pierce
2001-10-10 15:25     ` Benjamin C. Pierce
2001-10-10 17:07   ` Patrick M Doane
2001-10-10 17:25     ` Sven
2001-10-10 17:44       ` [Caml-list] Re: Emacs comment support (was OCamldoc) Patrick M Doane
     [not found]       ` <Pine.BSF.3.96.1011010133900.56825G-100000@fledge.watson.or g>
2001-10-10 19:25         ` Chris Hecker
2001-10-11 19:32   ` [Caml-list] Re: [Caml-announce] OCamldoc Xavier Leroy
2001-10-12  8:29     ` Andreas Rossberg
2001-10-12  8:57     ` Didier Remy
2001-10-12  9:27       ` Fabrice Le Fessant
2001-10-12 10:36       ` Benjamin C. Pierce
2001-10-12 13:13         ` Francois Pottier
2001-10-12 17:23           ` Alan Schmitt
2001-10-13 11:49           ` Benjamin C. Pierce
2001-10-13 13:46             ` Jimmie Houchin
2001-10-14 12:50             ` Frank Atanassow [this message]
     [not found]   ` <9q4tft$88t$1@qrnik.zagroda>
2001-10-11 20:13     ` Marcin 'Qrczak' Kowalczyk
     [not found] <9q1pg2$85h$1@qrnik.zagroda>
2001-10-10 15:35 ` Marcin 'Qrczak' Kowalczyk
  -- strict thread matches above, loose matches on Subject: below --
2001-10-09 11:40 Dave Berry
2001-10-09 12:14 ` Benjamin C. Pierce
2001-10-09  9:42 Dave Berry
2001-10-09 17:26 ` Maxence Guesdon
2001-10-10 13:29   ` Sven
2001-10-14  2:05     ` Mike Leary
2001-10-08 21:21 Maxence Guesdon
2001-10-09  6:26 ` [Caml-list] " Francois Pottier
2001-10-09 10:20   ` Jerome Vouillon
2001-10-09 11:41     ` Eric C. Cooper
2001-10-09 17:30     ` Maxence Guesdon
2001-10-09 14:26       ` Patrick M Doane
2001-10-09 21:12       ` rbw3
2001-10-10  9:19         ` Francois Pottier
2001-10-10 12:35           ` rbw3
2001-10-10 13:26     ` Sven
2001-10-09 14:46   ` Maxence Guesdon
2001-10-09  8:53     ` Fabrice Le Fessant

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20011014145004.B3057@cs.uu.nl \
    --to=franka@cs.uu.nl \
    --cc=Francois.Pottier@inria.fr \
    --cc=bcpierce@cis.upenn.edu \
    --cc=caml-list@pauillac.inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).