Is it possible to write some class members in another module ?

Boris Carvajal boris2.9 at gmail.com
Tue May 19 23:51:45 UTC 2020


On Tuesday, 19 May 2020 at 22:01:03 UTC, Vinod K Chandran wrote:
> Hi all,
> Is it possible to write some class members in another module ? 
> I have class with a lot of member variables.(probably 50+) I 
> would like to write them (Not all, but some of them) in a 
> special module for the sake of maintenance.

You can use Template Mixins to add variable declarations in 
others scope.

https://dlang.org/spec/template-mixin.html


More information about the Digitalmars-d-learn mailing list