Re: Nested Multiline Comment
- Posted by DerekParnell (admin) Jul 03, 2009
- 1221 views
Is there any reason why we shouldn't make this valid?
/* sequence name = "John" /* testing */ integer age = 133 */
I personally am in favor of the above working. I'd like to know the reasoning against it? I understand that multi-line comments were not designed to comment out working blocks of code and that an ifdef could be used, but is that the best way? Why not allow it to be commented out by multi-line comments?
I don't know the reasons against making work like that.
However, the D programming language has a special comment type for nested comments. It has
- //
- for single line comments
- /* ... */
- for non-nesting multi-line comments
- /+ ... +/
- for nesting multi-line comments
But on the other hand, the other language that I use frequently (Progress) has /* ... */ as nesting comments and I have never really been troubled by it.
Well we could try it but it would be hard to revert to non-nesting if we change our minds.

