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-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: 2003-04-08 (20:19)
From: Brian Hurt <brian.hurt@q...>
Subject: Re: [Caml-list] single-line comment request
On Tue, 8 Apr 2003, Basile STARYNKEVITCH wrote:

> I also suggest the following di-graph for comments
>   #! (which is compatible with Unix first line execve convention)

Aha!  OK- here is a really good reason to add single line comments, with 
#! as the comment delimiter- so we can put
as the first line in our programs, and have Ocaml as an interpreted 
scripting language, as well as a interpreter/bytecode/native language.

Congratulations.  This is by far the best argument I've seen put forth so
far.  So much so that it's actually changed my mind to be in favor of the 

>   -- (which is like comments in Ada and Haskell)
>   // (reminding of Java & C++)
>   %%
>   |* for the visual effect
>   !! (old Basic had single ! for comment)
> For tri-graph starting line comments we could consider
>   --- 
>   ***
>   |||
>   ///
>   -*-

All of the above are valid operator names.  Not sure about [*].  See page
91 of the language standard.


To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: