Why is D unpopular, redux.

Walter Bright newshound2 at digitalmars.com
Tue May 24 16:21:45 UTC 2022


On 5/24/2022 6:13 AM, deadalnix wrote:
> On Tuesday, 24 May 2022 at 05:39:50 UTC, Walter Bright wrote:
>> On 5/22/2022 6:31 AM, deadalnix wrote:
>>> https://issues.dlang.org/show_bug.cgi?id=1983
>>
>> It's been fixed already. Just nobody closed it.
> 
> No.

Yes, the issue that opened the bugzilla is fixed.

> 
> ```d
> struct S {
>      void delegate() dg;
> }
> 
> void main() {
>      int x = 42;
>      immutable S s = { dg: () { x++; } };
>      s.dg();
> 
>      import std.stdio;
>      writeln(x);
> }
> ```
> 
> This still compiles and run and mutates a variable through an immutable pointer. 
> This variable could be shared too because immutable is safe to share.

Other problems should get their own bugzilla. (Otherwise bugzilla becomes 
unmanageable.)


More information about the Digitalmars-d mailing list