new DIP47: Outlining member functions of aggregates

Iain Buclaw ibuclaw at ubuntu.com
Sat Sep 7 22:48:22 PDT 2013


On Sep 8, 2013 5:55 AM, "dennis luehring" <dl.soluz at gmx.net> wrote:
>
> Am 07.09.2013 19:00, schrieb Walter Bright:
>
>> 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
>>
>
>
> "Parameter names need not match."
>
> please don't do this - that will nearly kill any easy way of finding the
implementation,

That depends on your coding style and is not necessarily true.  Eg: I put
function names at the start of the line.

int
foo_bar ()
{
}

So all global functions are easily grep'able ('^foo_bar').

Same thing is also done with C++ outlined members ('^Class::foo_bar') and I
could see myself adopting the same for D aggregate methods too.

Regards
-- 
Iain Buclaw

*(p < e ? p++ : p) = (c & 0x0f) + '0';
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20130908/9f6c0347/attachment.html>


More information about the Digitalmars-d mailing list