How do you think about the flooding of bracket?

Chris Nicholson-Sauls ibisbasenji at gmail.com
Thu Jun 15 06:58:48 PDT 2006


Deewiant wrote:
> In my mind, when things start to get unreadable due to them spanning many lines
> and/or there being a lot of nesting, you can just use a comment at the ending
> curly bracket:
> 
> void foo() {
> 	...
> } // end foo()

This is generally what I do, except I don't say "end" because I already know that -- why 
else would I document a closing brace?  ;)  Instead I generally put a reminder of the type 
of the 'foo' I'm ending: function, or class, or struct, or whatever.  So in the case 
above, I'd write `// function foo`.

-- Chris Nicholson-Sauls



More information about the Digitalmars-d mailing list