June 02, 2014 Re: Indicating incompatible modules | ||||
---|---|---|---|---|
| ||||
On Sat, 31 May 2014 18:26:53 +0200 Joseph Rushton Wakeling via Digitalmars-d-learn <digitalmars-d-learn@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 |
Copyright © 1999-2021 by the D Language Foundation