Date: Mon, 22 Jun 1998 10:51:17 +0200
From: Xavier Leroy <Xavier.Leroy@inria.fr>
To: Donald Syme <Donald.Syme@cl.cam.ac.uk>, fbesnard <fbesnard@ac-nice.fr>
Subject: Re: per-line comments
In-Reply-To: <E0ymU5G-000632-00@heaton.cl.cam.ac.uk>; from Donald Syme on Thu, Jun 18, 1998 at 03:05:29AM +0100
> > - there is no 'per line' comment (like Ada's "--" or C++'s "//" ) ?
> I too think this is a must. It may not quite accord with the personal
> tastes of the CaML implementors,
Caml's comment syntax is more a question of historical tradition than
personal tastes. After all, the comment syntax is perhaps the only
bit of syntax that hasn't changed between LCF ML, Caml, and Standard ML...
> but many good programmers use this
> extensively in their in-line documentation.
I don't quite get the point about in-line documentation. I write
perfectly fine on-line documentation between (* and *). Why would it
be any better with // or -- ?
> I figure they should be
> able to transfer their "existing practice" when they make the switch to
> CaML, just to make the switch as painless as possible.
Depends from which background you come. E.g. for a well-trained C
programmer, delimited comments make more sense.
At any rate, the main problem with per-line comments (as with most
syntax extension) is that they need a reserved symbol. Both // and --
are valid OCaml infix identifiers; // is even used in the Num standard
library module.
- Xavier Leroy
This archive was generated by hypermail 2b29 : Sun Jan 02 2000 - 11:58:14 MET