digitalmars.D.learn - Indicating incompatible modules
- Joseph Rushton Wakeling via Digitalmars-d-learn (11/11) May 31 2014 Hello all,
- Dicebot (5/17) May 31 2014 Only at run-time (because of separate compilation) - you can
Hello all,
Is there a straightforward way to indicate that two modules should not be used
together in the same program? Preferably one that does not require editing
both
of the modules?
The application I have in mind is when one is making available an experimental
module which is planned to replace one that already exists; it's useful for the
experimental module to be able to say, "Hey, use me _or_ the standard module,
but not both of us."
Any thoughts ... ?
Thanks & best wishes,
-- Joe
May 31 2014
On Saturday, 31 May 2014 at 16:34:00 UTC, Joseph Rushton Wakeling
via Digitalmars-d-learn wrote:
Hello all,
Is there a straightforward way to indicate that two modules
should not be used together in the same program? Preferably
one that does not require editing both of the modules?
The application I have in mind is when one is making available
an experimental module which is planned to replace one that
already exists; it's useful for the experimental module to be
able to say, "Hey, use me _or_ the standard module, but not
both of us."
Any thoughts ... ?
Thanks & best wishes,
-- Joe
Only at run-time (because of separate compilation) - you can
iterate ModuleInfo and assert that only one of modules is
available.
May 31 2014








"Dicebot" <public dicebot.lv>