Discussion Thread: DIP 1035-- at system Variables--Community Review Round 2

Max Haughton maxhaton at gmail.com
Fri Feb 26 22:29:09 UTC 2021


On Friday, 26 February 2021 at 18:29:26 UTC, Nick Treleaven wrote:
> On Friday, 26 February 2021 at 09:49:40 UTC, Walter Bright 
> wrote:
>> > Example: User-Defined Slice
>>
>> Since ptr and length are private, they are only accessible to 
>> member functions of IntSlice.
>
> Er, doesn't private mean module access? This DIP would help 
> verify long modules that might inadvertently access unsafe 
> fields from outside the struct definition, at least in @safe 
> code.

https://run.dlang.io/is/KalIzj

Yes - however code subject to is supposed to be consumed in a 
different module for the most part, so this could be a nice side 
effect but it shouldn't (de jure) guide the actual DIP itself.


More information about the Digitalmars-d mailing list