Why is D unpopular?

Siarhei Siamashka siarhei.siamashka at gmail.com
Tue May 24 12:51:32 UTC 2022


On Tuesday, 24 May 2022 at 12:19:56 UTC, Adam D Ruppe wrote:
> On Tuesday, 24 May 2022 at 12:10:36 UTC, Siarhei Siamashka 
> wrote:
>> One of the valid criticisms of D language is that it is not 
>> @safe by default.
>
> I don't care about @safe. I'm talking real world safety, things 
> like automatic bounds checks.

Please try it nevertheless. You will have automatic bounds checks 
in your @safe code even with the '-release' switch. That's the 
whole point. The @safe code remains safe and the @system or 
@trusted code remains fast. The choice is up to me to decide what 
I really want in my code on a per-function basis.

>> Right now the '-release' option disables bounds checking in 
>> @system code and this is a **necessary** escape hatch to keep 
>> D language competitive with C++ and the other system 
>> programming languages.
>
> False. You can put `.ptr` in strategic places to disable it 
> locally instead of

If I didn't care about convenience, then I would be probably 
using Rust instead of D.

> bludgeoning it with a superglobal switch.

This isn't what I'm doing. Please educate yourself about the 
@safe attribute.

> Even if you want to disable it globally (and you don't, unless 
> you're too incompetent to be allowed to release anything to the 
> public), there's the -boundscheck=off switch for that. Bundling 
> it with a bunch of other things and hiding it behind a 
> harmless-sounding "-release" thing is criminally negligent in a 
> sane world.

I asked you for your suggested alternative. This is **your** 
suggestion. And it's **me**, who is supposed to criticize your 
suggestion. Thanks for doing my job, but what was the purpose of 
posting this paragraph? Are there any other suggestions that you 
actually consider reasonable?


More information about the Digitalmars-d mailing list