What are (were) the most difficult parts of D?

Guillaume Piolat first.last at gmail.com
Sat May 14 00:42:15 UTC 2022


On Friday, 13 May 2022 at 19:16:59 UTC, Steven Schveighoffer 
wrote:
>
> But we also have this confusing dynamic:
>
> |scope   |no attribute| shared |static     |
> |--------|------------|--------|-----------|
> |module  |TLS         |global  |TLS (no-op)|
> |function|local       |local!  |TLS        |
> |class   |instance    |global  |TLS        |


There is a typo in your array, a shared field is per-instance, 
not global.

     class A
     {
        shared int c; // Each A has its own c
     }



More information about the Digitalmars-d-learn mailing list