3 ms·
> I kind of understand why this would not go into any kind of standard. Other popular languages can do it. That aside, it is an immensely popular and useful fe
by WalterBright 2y ago
> I kind of understand why this would not go into any kind of standard.
Other popular languages can do it. That aside, it is an immensely popular and useful feature in D.
And yes, as one would expect, the more it is used, there's compile time speed and memory consumption required. As for a VM, the constant folder is already a VM. This just extends it to be able to handle function calls. C has simple semantics, so it's not that bad.
> Additionally
Great minds think alike! Your suggestions are just what D imports do.
https://dlang.org/spec/module.html#import-declaration https://dlang.org/spec/module.html#import-declaration
> In this specific case I don't know if I'm importing dex.d or dex.c
This issue does come up. The answer is setting up your import path. It's analogous to the C compiler include path.