C style 'static' functions

via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Jul 19 12:18:03 PDT 2017


On Wednesday, 19 July 2017 at 18:49:32 UTC, Johannes Pfau wrote:
>
> Can you explain why _object-level visibility_ would matter in 
> this case?

(I'm sure you have more experience with shared libraries than me, 
so correct me if I'm wrong)

We can't do attribute inference for exported functions because 
changing the function body may easily change the function 
signature (-> name mangling) and break clients of the (shared) 
library. Therefore, it follows that attribute inference can only 
be done for non-exported functions.


More information about the Digitalmars-d-learn mailing list