How to exclude function from being imported in D language?
acehreli at yahoo.com
Tue Mar 8 20:45:47 UTC 2022
On 3/8/22 12:12, BoQsc wrote:
> I think D Language needs and lacks conditional compilation condition and
> attribute of "exclude".
It may be so but this need wouldn't exist if either the first program
were written in a modular way to begin with or have been refactored to
be so as needed (at an earlier time or as you need it now):
- main.d contains main() and the high level program logic
- foo.d contains constructs that main.d uses
The other program is similar:
- main.d contains main() etc.
- bar.d imports 'foo' from the other program
I continuously refactor my programs in that way as they get more
complicated and as parts of them get used by other programs.
> The exclude keyword
I am not aware of that feature in other languages.
More information about the Digitalmars-d-learn