May 23, 2022
On Monday, 23 May 2022 at 17:39:58 UTC, Adam D Ruppe wrote:
> On Monday, 23 May 2022 at 17:30:38 UTC, mee6 wrote:
>> I don't think so, I don't want things to break cause I want my code to keep working.
>
> Not all breakages are the same.
>
> Some of the "breakage" I want are places where the compiler accepts invalid things according to the spec. Which means your code is *currently* broken, just the compiler doesn't tell you.
>
> You also need to consider migration paths and if it is forward or backward compatible.

Indeed.
May 24, 2022

On Friday, 20 May 2022 at 11:28:38 UTC, deadalnix wrote:

>

So I was catching up with he humongous thread. What stroke me in there is that almost everybody is missing the point, but maybe that isn't so surprising, as there is a self selection bias at play.

I especially noticed this post: https://forum.dlang.org/post/kkmlkebnsbembkispcya@forum.dlang.org

Apparently, we are getting named argument soon. I have no opinion whether this is good or bad, I haven't even read he proposal. But I don't need to to know this is pretty bad for D, even if the proposal is really good.

I'd like to remind everybody of a simple fact: it is impossible to write a high quality generic container in D, right now. This is because there is no way to explain to the compiler that a const Vector!T is the same as a const Vector!(const T).

There is no syntactic sugar, no optimization, no static analysis, no nothing that can compensate for this, just like it doesn't matter how comfortable the seat are on a car which has no wheels.

On the other hand, this will yet again break many tools, setting the ecosystem back once again. This same pattern has been repeating for at least a decade by now.

this thread and the previous as well has a strong "conoisseur" bias.
You finally ends up with testimonials from experts but in the end you still dont really know why mr rookie gave D up.

May 24, 2022

On Tuesday, 24 May 2022 at 02:04:34 UTC, Basile B. wrote:

>

this thread and the previous as well has a strong "conoisseur" bias.
You finally ends up with testimonials from experts but in the end you still dont really know why mr rookie gave D up.

Obviously, the story is going to change from rookie to rookie, but generally, you got to really nail something. because then you get the people who have that very specific thing in need of nailing as avid follower, and you move on the next niche.

For instance, Rust really nailed the whole ownership thing. I remember 10 years ago Andrei pointing out that Rust skipped leg day. he was right: D was better than Rust at everything but one thing: ownership. Now Rust is better at many things.

Rust's story isn't unique, it is actually very common.

D main's problem is that it is good at many things, probably more things than most, but it doesn't really nails anything.

May 23, 2022
On 5/22/2022 3:37 AM, Timon Gehr wrote:
> Maybe we can bump the priority on the bugzilla issues?

Thanks for providing bugzilla references. They are very helpful when bringing up issues on the n.g.

My plan after ImportC has reached a certain point is to go through every issue on bugzilla marked with the "safe" keyword. (Of course, anyone else can, too.)

One of the issues you posted is marked with "safe", the other wasn't, so I added "safe" to it.
May 23, 2022
On 5/22/2022 3:37 AM, Timon Gehr wrote:
>>> Just on type qualifiers:
>>>   - Transitivity of type qualifier doesn't play nice with template. There is no way to tell the compiler that a `const Tpl!T` actually is a `const Tpl!(const T)`. As a result, no container library is possible and ranges have serious problem when it come to qualifiers too.
>>
>> This needs a lot more fleshing out about what exactly is wrong and why.
>> ...
> 
> Instances of the same struct/class template are independent types without any relationship. Different types of slices (for example) are not.

Illuminating examples, please.


> There is no way to declare a tail-immutable class reference.
> 
> immutable(int)* <- can rebind the reference, can't assign to value
> 
> immutable(Class) <- can't rebind the reference
> Class <- can rebind the reference, can assign to value

Should file an Enhancement Request on Bugzilla.
May 23, 2022
On 5/22/2022 4:42 AM, Adam D Ruppe wrote:
> This has been another issue with D's const from day one. Pull request #3 was an attempt to fix it:
> 
> https://github.com/dlang/dmd/pull/3
> 
> 
> You complain that you don't have people at your command. Well, there's plenty of people doing plenty of work.
> 
> You just keep turning us away.

People closing their own PRs means they get forgotten. I didn't close it or turn it away.

The author's comments in it say it is only a partial implementation.

Daniel was the only one to review it. There are many people in the core team.
May 24, 2022

On Tuesday, 24 May 2022 at 02:04:34 UTC, Basile B. wrote:

>

You finally ends up with testimonials from experts but in the end you still dont really know why mr rookie gave D up.

Overall the signal from beginners that did not give up early appears to be IDE and libraries. From experienced beginners the signal is inconsistencies and unusual choices. From nonhardcore the signal is lack of stability. From hardcore the signal is incompleteness.

Then the usual requests for features from other languages...

Adding more features is probably not an improvement overall.

May 23, 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.
May 23, 2022
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.
May 24, 2022

On Monday, 23 May 2022 at 18:39:10 UTC, Ola Fosheim Grøstad wrote:

>

On Monday, 23 May 2022 at 17:59:11 UTC, FeepingCreature wrote:

>

Right, but most of all I want my future code to be better!

Easy to solve, use 4 branches: old, stable, nextgen, experimental. Every 3 years advance stable to old, nextgen to stable. Features move from experimental to nextgen when completed and tested. Old gets critical security updates, but not much more. Stable gets fixes.

Then everyone has 3+ years to upgrade their codebase. If they want faster use nextgen or experimental.

And use semver.

No more confusion... and more freedom.

  • Programmer effort spread over four branches
  • Every bugfix has to be rebased three times
  • Three years?! We'd have gotten templates in stable in 2008!
  • If something is annoying, do it less often; if something is painful, do it more often.

Honestly, I don't understand this. We get maybe one or two bugs from DMD updates every half-a-year. What's the issues that cause so much upgrade costs?