Why is D unpopular, redux.

Tejas notrealemail at gmail.com
Fri May 20 12:01:17 UTC 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.

Isn't that a consequence of transitive const though? Allowing one 
to bypass that means getting rid of one of the most distinctive 
features of D 😧

If we get rid of that, then our const will almost become the same 
as C++'s(only `mutable` will be left, ie, logical const)

Is that okay?


More information about the Digitalmars-d mailing list