Christopher Wright wrote:
Eh, this would have to extend to every function, since static ctors can call functions. And these functions can be provided without implementations via a .di file. This is fail.

Such problems are called "whole program analysis", or "interprocedural analysis". There are a lot of cool things you can do with that, but of course they require 100% of the program text to be available to the compiler.

That isn't going to happen with D (even if all the D source were available, what about calling C binaries?). So we have to rely on other mechanisms.

Reply via email to