Why is D unpopular, redux.

Walter Bright newshound2 at digitalmars.com
Tue May 24 05:31:28 UTC 2022


On 5/22/2022 6:31 AM, deadalnix wrote:
> I wrote DIP, they pretty much got ignored.

Which DIP? When you talk about various issues, it is really really helpful to 
post links to what you are referring to.


> I reviewed DIP, pointing how they'd lead to the problems we have now, this got 
> ignored too.

Which DIP?


> Honestly, never again.

I can understand your feelings about this. But I simply cannot devote 100% to 
everything that people bring up. Sometimes you gotta stand up and shout, and 
sometimes take matters into your own hands.

A lot of D's development comes from people who took matters into their own hands.


> https://issues.dlang.org/show_bug.cgi?id=1983

> https://issues.dlang.org/show_bug.cgi?id=2043

We have better tools to deal with 2043 today. Note that dgList exceeds the 
lifetime of b, and should fail to compile for that reason.

Let's try it (adding import and @safe and updating the code to D2):
----
import std.stdio;

@safe:

void delegate()[] dgList;

void test() {

         foreach(int i; [1, 2, 3]) {
                 int b = 2;
                 dgList ~= { writeln(b); };
                 writeln(&b); // b will be the *same* on each iteration
         }
}
----

 > dmd test.c -preview=dip1000
test.d(13): Error: reference to local variable `b` assigned to non-scope 
parameter `_param_0`

Looks like we can close it now!


> Note the first one is from 2008
> 
> I think i can stop here because the point is made. All of these have long 
> standing bug report for them. Many of these reports are 10+ years old. Several 
> have DIPs.
> 
> The problem here isn't that people aren't reporting these, or aren't writing DIP 
> or whatever. It is that they are told to do so, waste their time doing that and 
> then they get named argument instead.

BTW, the last comment in the bugzilla is from 2018. It hasn't been completely 
ignored all this time. It also happened to get fixed at some point.


More information about the Digitalmars-d mailing list