new DIP47: Outlining member functions of aggregates

Daniel Murphy yebblies at nospamgmail.com
Sat Sep 7 21:32:43 PDT 2013


"Walter Bright" <newshound2 at digitalmars.com> wrote in message 
news:l0fm2o$2uat$1 at digitalmars.com...
> 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

I am strongly opposed to this DIP.  I think it brings a little slice of C++ 
hell to D.

This change will result in manually-synchronized duplication.  The argument 
that IDEs can deal with this automatically is irrelevant, because they 
currently can't and are unlikely to do so any time soon.

The main motivation for this seems to be that you can't get a clear overview 
of a class from looking at the raw source code.  I propose a much simpler 
solution to this:

** Introduce compiler-checked (via warnings) class summary documentation. **

This solves the problem - an overview of the class is available in the raw 
source code, and enabling the warning will prevent them from getting out of 
sync.

Let's solve a documentation issue with documentation improvements. 




More information about the Digitalmars-d mailing list