Why is D unpopular?

Siarhei Siamashka siarhei.siamashka at gmail.com
Tue May 24 12:10:36 UTC 2022


On Tuesday, 24 May 2022 at 11:30:28 UTC, Adam D Ruppe wrote:
> On Tuesday, 24 May 2022 at 09:05:57 UTC, Siarhei Siamashka 
> wrote:
>> So having the '-release' option, which provides reasonable and 
>> mostly optimal defaults is very useful.
>
> It is neither reasonable nor optimal. -release enables a random 
> set of *bad* switches that will HURT your code. It removes all 
> the default safety features in the language for no actual 
> benefit!

I think that you are barking up the wrong tree.

One of the valid criticisms of D language is that it is not @safe 
by default. A workaround is to add "@safe:" at the top of the 
source files to achieve this. Does this resolve your problems?

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. Many safe programming languages still allow to go the 
unsafe route in the performance critical parts of code to disable 
bounds checking and the other expensive safety features. For 
example, you can have a look at 
https://doc.rust-lang.org/book/ch19-01-unsafe-rust.html

> Seriously, *never* use it. It should be removed.

What would be your suggested replacement for this very important 
functionality? But again, please first check @safe attribute 
before suggesting anything really disruptive.

Moreover, the concept of 'release' builds exists in many other 
programming languages and removing it from D would be weird.


More information about the Digitalmars-d mailing list