On 08/30/2017 05:49 PM, EntangledQuanta wrote:

> The compiler can and should do this!

Yes, the compiler can do it for each compilation but there is also the feature called /separate compilation/ that D supports. With separate compilation, there would potentially be multiple different and incompatible definitions of the same interface because compilations cannot know the whole set of instantiations of templates.

This relatively popular request is impossible in D as well as other languages like C++ that practically settled on vtbl-based polymorphism.

Ali

Reply via email to