Partial class implementation
janderson
askme at me.com
Mon Jul 16 21:41:31 PDT 2007
Tristam MacDonald wrote:
> This might be an interesting perspective on the kind of harm such an option might cause:
> http://www.ddj.com/dept/cpp/184401197
>
> Robert Fraser Wrote:
>
>> Random, C#-inspired thought:
>>
>> It would be nice if it were possible to implement parts of classes in different modules than other parts. This would allow logical grouping of methods for a set of related classes.
>>
>> This is already possible via template mixins (sort of, but alias template params are required to access fields), but explicit partials might be quite helpful.
>
I thought it was possible to do something like:
void foo(A a)
{
}
...
a.foo();
I tried it out and it didn't work. Sigh, it would be awesome for many
reasons if D did support this.
-Joel
More information about the Digitalmars-d
mailing list