partial class
Ary Borenszweig
ary at esperanto.org.ar
Fri Oct 31 07:49:49 PDT 2008
Mike James wrote:
> Not sure if this has been suggested before as an addition to D but what about introducing a partial class as per C# - with all the benefits it would bring...
To my understanding, partial classes were introduced by Microsoft to
make it easier for *them* to rewrite the UI code coming from a designer
without having to watch out for user code. That is, whenever you change
controls in the designer, now they just need to rewrite the .designer.cs
class and not worry about erasing or skipping code you defined besides
UI code.
Conclusion: the motivation is coming from the UI, and to make life
easier for them. (Maybe there are other reasons? I've been programming a
lot in C# lately, and I never needed a partial class)
Since D doesn't have a UI designer or nothing is integrated that much...
what would you use partial classes for?
If it's not for that reason, I think it makes it harder to know where
is defined the code you are looking for.
More information about the Digitalmars-d
mailing list