Greenwashing

Adam D. Ruppe destructionator at gmail.com
Thu May 28 00:59:30 UTC 2020


On Thursday, 28 May 2020 at 00:51:52 UTC, Nicholas Wilson wrote:
> Thats a brilliant idea, however the issue of extern still 
> remains with the additional complication of mangling due to 
> attributes and also separate compilation/.di files.

extern ones (including probably abstract/interface methods) 
require an annotation, otherwise it is inferred.

Then you can explicitly put a thing on if you want a guarantee of 
it (as a user) or to provide a guarantee of it (as a lib designer 
/ interface publisher).

It really does lead to everyone wins... and this pattern can be 
extended to other functions as well. And we have precedent with 
templates.

> Separate compilation may be a lot slower if inference must be 
> done for function bodies.

Extremely unlikely - it already does those checks to confirm the 
annotation anyway!


More information about the Digitalmars-d mailing list