A suggestion for modules names / sharing code between projects
Jonathan M Davis via Digitalmars-d
digitalmars-d at puremagic.com
Mon Feb 29 11:23:08 PST 2016
On Monday, 29 February 2016 at 19:03:53 UTC, Sebastien Alaiwan
wrote:
> Clearly, something must be wrong here (and I hope it's me!)
> I'd be very happy if someone showed me how solve this problem,
> this has bothered me for ages.
My solution would be to never have the same file be part of
multiple projects. Share code using libraries rather than just
sharing the files. Then modules won't be changing where they are
in a project or anything like that. The shared code goes into a
library, and whichever projects need it link against that
library. You get better modularization and encapsulation that way
and completely avoid the problem that you're having.
- Jonathan M Davis
More information about the Digitalmars-d
mailing list