<div dir="ltr">+1_000_000_000<div><br><div style>Yes please!</div></div><div style>It's near impossible to get a brief overview of a class at a glance in D!</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On 3 March 2013 15:35, Andrej Mitrovic <span dir="ltr"><<a href="mailto:andrej.mitrovich@gmail.com" target="_blank">andrej.mitrovich@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Friday, 22 July 2011 at 22:06:20 UTC, Andrei Alexandrescu wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
1. The compiler shall accept method definitions outside a class.<br>
</blockquote>
<br>
Sorry to bump this old thread, but after having spent some time with D I like the idea of having the ability to implement class methods outside of the class, but I would like to have this ability in the same file as the module:<br>

<br>
module test;<br>
<br>
class C<br>
{<br>
    void foo1();<br>
<br>
    void bar1()<br>
    {<br>
        // N1 -- two indents<br>
    }<br>
<br>
    class Inner<br>
    {<br>
        void foo2();<br>
        void bar2()<br>
        {<br>
            // N2 -- three indents<br>
        }<br>
    }<br>
}<br>
<br>
// if allowed:<br>
<br>
void C.foo()<br>
{<br>
    // 1 indent<br>
}<br>
<br>
void C.Inner.foo2()<br>
{<br>
    // 1 indent<br>
}<br>
<br>
The benefit? Avoiding the indentation tax. I've come to find it really annoying that hundreds of lines of code end up being indented twice or more times. Changing the indentation setting is not a real solution, I like my indentation size the way it is, I just don't like being forced to indent too much because of the requirement to implement everything inline.<br>

</blockquote></div><br></div>