Adding a new design constraint to D

forkit forkit at gmail.com
Thu Jun 16 01:04:22 UTC 2022


On Thursday, 16 June 2022 at 00:06:14 UTC, forkit wrote:
>

see .. the world does not come crashing down, simply because you 
can declare something private ;-)


(in Swift)

// -----------
struct A
{
   private static var x = 100;
   fileprivate static var z = 200;
}

//print(A.x); //  error: 'x' is inaccessible due to 'private' 
protection level
print(A.z); // ok

// -----------



More information about the Digitalmars-d mailing list