Partial classes

Max Samukha maxsamukha at gmail.com
Mon Jun 25 23:26:00 PDT 2012


On Monday, 25 June 2012 at 23:44:09 UTC, Walter Bright wrote:

> As Timon also said, in C# you have to add in "partial" to the 
> class definition anyway - isn't that the same as inserting a 
> template/string/import mixin or pimpl?
>

That is not exactly the same. The important difference is that 
partial definitions can have attributes, interfaces, nested 
partial definitions etc., which will be merged in the resulting 
definition. That is not achievable with mixins or pimpl in a 
satisfactory way. See 
http://msdn.microsoft.com/en-us/library/wa80x488(v=vs.80).aspx.

Not arguing for this feature. Simply noting that it is NOT the 
same as mixins/pimpl.


More information about the Digitalmars-d mailing list