Split D class file

BLS nanali at nospam-wanadoo.fr
Sun Sep 23 14:09:23 PDT 2007


Jari-Matti Mäkelä schrieb:
> B.Schulte wrote:
> 
>> Hi!
>>
>> Is it somehow possible to store some methods of a class in another D file?
>> The class is really getting too big.
>>
>> Well, maybe some of you suggest me to split the class in multiple ones,
>> but this class is important to be one part. The only way would be to have
>> many many friend classes. But that's also very strange.
> 
> Inheritance, composition and mixins are quite common design patterns in OO
> languages. D also has hybrid member/free functions. 
If none of those help,
> you probably have a major problem in the program design.

Was my first idea too. Means having a fat class is more an design issue 
than an language related prob. But since I am going to translate a MFC 
like GUI using a lot of GDI wrapper functions I am not that sure. ;-)
Bjoern....



More information about the Digitalmars-d mailing list