Code Style
Clay Smith
clayasaurus at gmail.com
Fri Jun 15 12:53:16 PDT 2007
Robert Fraser wrote:
> So, what style do you code with?
I follow http://www.digitalmars.com/d/dstyle.html , except:
1) Indent using hardware tabs for each level indent
2) use
func()
{
}
curly brace style
3) class arguments I use (argV1, argV2) , V1_ V2_ or _V1 _V2 would also
work for me (might switch to one of those)
function arguments I use whatever
Member align would be nice.
I usually do import decls like this
import
(tab)one,
(tab)two,
(tab)three,
(tab)four;
I also seperate these import statements by the first decl in the
statement, like
import
(tab)one.one,
(tab)one.two;
import
(tab)two.one,
(tab)two.two;
No line wrapping.
If a function is only one line long, I like to put it all on one line
void func() { return; }
Yes, I would like to use a code formatter.
More information about the Digitalmars-d
mailing list