static functions?

user1234 user1234 at 12.de
Mon Mar 11 19:00:44 UTC 2024


On Monday, 11 March 2024 at 16:51:48 UTC, Andy Valencia wrote:
> On Monday, 11 March 2024 at 16:25:13 UTC, Jonathan M Davis 
> wrote:
>> ...
>> But what exactly static means varies based on the context.
>
> Thank you for the list!  But none of those appear to apply to a 
> function defined in the outermost scope of the module.  Is 
> static accepted here--but has no actual effect?

Yes module-level `static` (for what is aka "free-functions", but 
also variables) is a noop. Module-level is implicitly static.

> I will look at the privacy controls--thanks again.

No need to ;) D `static` is a storage class, not a visibility 
attribute.

> Andy




More information about the Digitalmars-d-learn mailing list