Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] single-line comment request
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Brian Hurt <brian.hurt@q...>
Subject: Re: [Caml-list] single-line comment request
On Tue, 8 Apr 2003, Nickolay Semyonov-Kolchin wrote:

> On Tuesday 08 April 2003 20:19, Brian Hurt wrote:
> > Personally, I don't find having to type three extra characters (space
> > asterix close-paren) to end a comment to be that big of a burden.  If a
> > comment is long enough that three extra characters pushes it over a line
> > length, then the comment is long enough to deserve it's own line.  And if
> > the burden of typing the three extra characters is enough that you stop
> > writting (as many) comments, well, you have other problems IMHO.
> >
> > I am not seriously opposed to this, I just don't see the value.
> >
> 
> 1) This extension won't broke existing source code. Currently, we can't use 
> '##' anywhere in Ocaml.

Yep.  Checked that before posting.  It does mean you can't run your ocaml 
code through the C preprocessor- although I have no clue why you'd want to 
do that.

> 
> 2) This is programming-style extension. I.e. if you don't like don't use it.

If I'm working alone, this works.  If I'm working with other people, or on 
other people's code, this may not be an option.

> 
> For example, Larry Wall see no reason for multi-line comments. He argued that 
> single-line comments are much easier to read (See Perl6 design documents).

If we had single-line comments, and the proposal was to add multi-line 
comments, I'd feel the same way.

And Larry Wall is maybe not the best person to be taking style tips from 
for Ocaml.  If Perl is the archtype of post-modern programming languages, 
than Ocaml must the the paragon of modern programming languages ("I am the 
very model of a modern language paradigm...").  And I think there are 
advantages to "modern" (in the Wall sense) languages.  But I am not here 
to praise Larry Wall, but to bury him.

> 
> Again, this extension is purely stylish.

Actually, personally I think ## is ugly, in that it looks entirely unlike 
Ocaml's current comment-start sequence of (*.  At least with C++, /* and 
// are similiar *visually*.  

Brian


-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners