Split D class file

Jari-Matti Mäkelä jmjmak at utu.fi.invalid
Sun Sep 23 06:22:11 PDT 2007


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.



More information about the Digitalmars-d mailing list