new DIP47: Outlining member functions of aggregates
Martin Nowak
code at dawg.eu
Mon Sep 9 21:24:20 PDT 2013
On 09/07/2013 07:00 PM, 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
I'm really happy to see this discussed.
The DIP misses to mention one of the most important rationale IMO,
hiding of implementation details.
> http://wiki.dlang.org/DIP47#Semantics
> 7. Outlined member function return types, parameter types, and
function bodies have private access to the module where the aggregate is
declared.
I think this is problematic because it gives up the nice
everything-within-this-file property of private.
Doesn't package access mitigate the need for private access?
What about module scope functions?
More information about the Digitalmars-d
mailing list