<div class="gmail_quote">On 18 March 2012 04:14, F i L <span dir="ltr"><<a href="mailto:witte2008@gmail.com">witte2008@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">Manu wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
That's no less ugly though, in fact, it's considerably more ugly. more<br>
brace spam + indentation levels for nothing.<br>
</blockquote>
<br></div>
I actually like the bracket+indentation as a section separator indicator. Usually I'll "group" fields/methods by common attribute:<br>
<br>
    class Window<br>
    {<br>
        private {<br>
            string _title;<br>
            int _x, _y;<br>
            // etc...<br>
        }<br>
<br>
        @property {<br>
            auto title() { return _title; }<br>
            auto x() { return _x; }<br>
            auto y() { return _y; }<br>
            // etc...<br>
        }<br>
    }<br>
<br>
    // Or...<br>
<br>
    struct Vector2(T)<br>
    {<br>
        T x, y;<br>
<br>
        @property {<br>
            auto xy() { return this; }<br>
            auto yx() { return Vector2(y, x); }<br>
        }<br>
<br>
        @property static {<br>
            auto zero() { return Vector2(0, 0); }<br>
            auto one()  { return Vector2(1, 1); }<br>
            // etc...<br>
        }<br>
    }<br>
<br>
But I'm also use to C# code which is usually indented twice before you even get to functions (namespace -> class -> method).<br>
</blockquote></div><br><div>Yeah, I'm not really into that. I group things conceptually.</div><div>Either way, I've never written a class where non-virtuals don't outweigh virtuals in the realm of 20:1. There needs to be a way to declare it the other way around without polluting my indentation levels.</div>
<div>final: at the top and explicit 'virtual' would make a big difference.</div>