Re: Code spliting in module and packages

2014-07-21 Thread bearophile via Digitalmars-d-learn
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

Re: Code spliting in module and packages

2014-07-21 Thread Mike Parker via Digitalmars-d-learn
On 7/21/2014 7:13 AM, Matthieu wrote: Hi! I can't find any good tutorial about how to split my source code in modules and packages. I don't want to use a Java splitting style (one class per file) or something like that, I want to use the D way, but it's so hard to find it! Can someone explain

Re: Code spliting in module and packages

2014-07-21 Thread bearophile via Digitalmars-d-learn
Matthieu: Thanks for your answers. I'll continue to code as I ussed to do, and try to improve my style to have a better usage of the modules (today i'm most one class per file, so I don't use the modules at all). Also, try to use less classes and more free (pure) functions :-) This means a

Re: Code spliting in module and packages

2014-07-21 Thread Matthieu via Digitalmars-d-learn
Hi, Thanks for your answers. I'll continue to code as I ussed to do, and try to improve my style to have a better usage of the modules (today i'm most one class per file, so I don't use the modules at all). Bye, Matthieu

Re: Code spliting in module and packages

2014-07-21 Thread bearophile via Digitalmars-d-learn
Dicebot: Probably most idiomatic D way is to use files _instead_ of classes :) It is a bit idealistic though and is not yet 100% feasible in practice. What's stopping it from being feasible? Bye, bearophile

Re: Code spliting in module and packages

2014-07-21 Thread Dicebot via Digitalmars-d-learn
On Monday, 21 July 2014 at 18:02:33 UTC, bearophile wrote: Dicebot: Probably most idiomatic D way is to use files _instead_ of classes :) It is a bit idealistic though and is not yet 100% feasible in practice. What's stopping it from being feasible? Bye, bearophile Stuff like this :