(Non) Nesting block comments

Leandro Lucarella llucax at gmail.com
Mon Jul 20 19:54:33 PDT 2009


Marianne Gagnon, el 20 de julio a las 21:31 me escribiste:
> In C++, I use comments for 2 purposes :
> 
> 1) Add documentation
> 2) Disable code (also with #if 0 ... #endif)
> 
> Since those two actions are logically very different, I believe it's nice that they're separate.
> 
> Why I *would* propose, however, is to get rid of /**  ... */, and say that /* ... */ is always for documentation.

/++
 + /++ +/ are good for documentation when you have code examples.
 +
 + Examples:
 + ---------------------------
 + /* A example function */
 + int example() {
 +     /+ some other comment +/
 +     return 1;
 + }
 + ---------------------------
 +/

-- 
Leandro Lucarella (luca) | Blog colectivo: http://www.mazziblog.com.ar/blog/
----------------------------------------------------------------------------
GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145  104C 949E BFB6 5F5A 8D05)
----------------------------------------------------------------------------
Y vos, me dijiste que soy, un abismo de silencio.
Será, porque vos no escuchas, que yo grito por dentro.



More information about the Digitalmars-d mailing list