new DIP47: Outlining member functions of aggregates

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Mon Sep 9 17:39:43 PDT 2013


On 9/9/13 5:12 PM, Walter Bright wrote:
> On 9/8/2013 5:03 PM, Andrei Alexandrescu wrote:
>> D's module system has always favored a file-granular approach, e.g.
>> private
>> stuff is module-private. This notion of spilling private access
>> outside the file
>> into methods defined in various other files works against that nice
>> tenet.
>>
>> So it looks there's no obvious and obviously good solution. Probably
>> the first
>> one is more sensible.
>
> One solution that has been proposed here (by Manu and perhaps others) is
> that the outlined functions can only appear inside the same module that
> the declaration is in.
>
> This would resolve the private access problem and the modularity problem.

It also reduces the motivation for the thing as it becomes a minor 
convenience.

Andrei




More information about the Digitalmars-d mailing list