OEP

0155

Title

Multi-line comments

Summary

A mechanism to specify top-level, multi-line comments

Owner

Matt Jadud <mcj4@kent.ac.uk>

Status

Proposed

Date-Proposed

2006-04-24

Keywords

language comments

occam currently has no mechanism by which to specify a multi-line comment -- which makes it awkward to write inline documentation using OccamDoc, since each line must be preceded by --.

A good discussion of the problems of implementing block comments in indentation-based languages can be found [on the Python mailing list][comments].

Haskell, which has a syntax very similar to occam's, supplements its -- line comments with {- and -} markers for block comments. Many other options (such as '''-- and --''', or {-- and --}) are also currently free in the occam syntax.

We could even provide -- or even just provide -- a special syntax purely for OccamDoc comments:

--* This function does something

INT FUNCTION ...

[comments]: http://www.gossamer-threads.com/lists/python/python/480649

OEP/155 (last edited 2007-09-27 01:31:59 by ats1)