Indicating incompatible modules

Jonathan M Davis via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sun Jun 1 19:37:41 PDT 2014


On Sat, 31 May 2014 18:26:53 +0200
Joseph Rushton Wakeling via Digitalmars-d-learn
<digitalmars-d-learn at puremagic.com> 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 ... ?

I wouldn't really worry about it. I'd just document the new module as a
replacement for the other and that they're not intended to work together. I
don't see much point in trying to get the compiler to complain about code that
uses both.

- Jonathan M Davis


More information about the Digitalmars-d-learn mailing list