new DIP47: Outlining member functions of aggregates

Jacob Carlborg doob at me.com
Mon Sep 9 00:02:09 PDT 2013


On 2013-09-07 19:00, Walter Bright wrote:
> Outlining of member functions is the practice of placing the declaration
> of a member function in the struct/class/union, and placing the
> definition of it at global scope in the module or even in another module.
>
> http://wiki.dlang.org/DIP47

What's wrong with the code below, that works today:

class Foo
{
     void foo ();

     void foo ()
     {
         writeln("Foo.foo");
     }
}

void main ()
{
     auto foo = new Foo;
     foo.foo();
}

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list