Matthieu:

Can someone explain to me how to do it well, please?

Put related stuff in a module, and unrelated stuff in other modules. If the module grows too much, split it up in two or more. It's about the same as in Python. Just remember that classes can see each other private members only if they are in the same module. So if you move things to another module, sometimes some stuff (like unittests) breaks.


In the same time, is there someone who knows where to find a good style guide for D, something like the PEP for python?

A starting point:
http://dlang.org/dstyle.html

Bye,
bearophile

Reply via email to