Why is D unpopular

user1234 user1234 at 12.de
Mon Jun 13 10:55:12 UTC 2022


On Monday, 13 June 2022 at 10:49:37 UTC, Paulo Pinto wrote:
> On Monday, 13 June 2022 at 09:12:47 UTC, user1234 wrote:
>> On Monday, 13 June 2022 at 09:09:08 UTC, user1234 wrote:
>>> [...]
>>
>> well the online compilers are too old, but if you try this 
>> code with a more recent compiler
>>
>> ```pascal
>> {$MODE OBJFPC}{$H+}
>> {$MODESWITCH ADVANCEDRECORDS}
>> type TS = record
>>   private
>>     a: integer;
>>   strict private
>>     b: integer;
>> end;
>>
>> var
>>  s: TS;
>>
>> begin
>>   s.a := 1; // OK
>>   s.b := 1; // NG
>> end.
>> ```
>>
>> this gives
>>
>>> [...]
>
> You should have used compiler explorer. :)
>
> https://godbolt.org/z/6M7be7M57

nice, even highlighting of "strict private" is correct there.
one more kudo for compiler explorer.


More information about the Digitalmars-d mailing list