17 Jun 12:42
Comments and end annotations
From: Victor Luchangco <Victor.Luchangco@...>
Subject: Comments and end annotations
Newsgroups: gmane.comp.lang.fortress.general
Date: 2008-06-17 10:45:22 GMT
Subject: Comments and end annotations
Newsgroups: gmane.comp.lang.fortress.general
Date: 2008-06-17 10:45:22 GMT
In reading some library code recently, I got confused because I didn't realize that some code was commented out, and that some other code was part of an object declaration. So I wonder if what others think about the following: 1. When code within comments is rendered as ordinary Fortress code, it is slightly indented with a continuous vertical line at the left margin. If there are multiple levels of nesting such commented-out code, then there should be one such line for each level of nesting. (Basically mimicking quoting in many mail handlers.) This affects only the rendering of Fortress comments, not the syntax or semantics of Fortress code. 2. After the closing "end" of a multiline trait or object declaration, or a component or api declaration, it is permissible (but not required) to write the name of the trait/object/api/ component being declared. Such a name must appear on the same line as the end, and it is a static error if it does not match the name declared. (The static parameter list is not considered part of the name for this, or any other, purpose.) For example, object O end O trait A[\X\] end A (* the following is a static error *) trait T end x(Continue reading)
RSS Feed