How do you think about the flooding of bracket?
Mike Parker
aldacron71 at yahoo.com
Thu Jun 15 23:42:59 PDT 2006
The previous post was suppose to be in response to Boris. And I wrote
it, not Unknown ;)
Mike Parker wrote:
> Unknown W. Brackets wrote:
>
> I've adopted a syntax where I only use the colon (:) form on protection
> attributes inside class/struct definitions. Outside, at module scope, I
> use brackets for for protection attributes. Other modifiers, such as
> static, final, abstract, I use inline. Version statements and multi-line
> debug statements all get brackets. extern statements get colons.
>
> It's a coding convention I've come to like. I would really hate to see
> the colon syntax removed because I find it to be much more readable in
> class definitions:
>
> class MyClass
> {
> private
> {
> void myFunc();
> }
> }
>
> With one function it's not so bad, just ugly. But with multiple methods,
> the colon form is much clearer to me. And I really wouldln't like being
> forced to put all of my protection attributes inline.
>
> This is all just a matter of taste. Having optional coding styles is
> nice, I think. I understand where you're coming from, but there are many
> other ways to make code difficult to read. As I see it, this ain't broke
> so don't fix it.
More information about the Digitalmars-d
mailing list