Why is D unpopular?
Siarhei Siamashka
siarhei.siamashka at gmail.com
Tue May 24 09:05:57 UTC 2022
On Tuesday, 24 May 2022 at 07:02:29 UTC, max haughton wrote:
> The idea of a release build is something of a mistake anyway,
> it's usually not exactly right for a given purpose so you're
> better off specifying exactly what you want instead anyway.
I strongly disagree with this opinion. When shipping a product as
a source code, end users may use various wild combinations of
compiler options to build it. This may result in sub-optimal
performance if some of the important options are forgotten. Or
this may result in program misbehavior if it gets miscompiled by
some super duper experimental options. It's also difficult to
test all possible permutations of the available build options.
So having the '-release' option, which provides reasonable and
mostly optimal defaults is very useful. In reality
https://en.wikipedia.org/wiki/Safety_in_numbers is also a thing.
If the majority of users use the same build options, then they
are likely to encounter the same bugs and/or performance problems
in the compiler, report these problems and have these problems
resolved. Autovectorization and LTO are somewhat immature and
controversial, but if they were rock solid and never regressed
anything, then I would like to see them included as a part of the
default '-release' options bundle too (that's of course a big IF).
When developing free open source software in C/C++, I had to deal
with the end users or distro maintainers picking bad compilation
options on more than one occasion. In my experience, fine grained
individual optimization options to enable or disable something
are mostly useful for troubleshooting compiler bugs.
Considering what I said above, it's not surprising that D is also
often misconfigured on various programming competition websites
(which is probably not a very important use case, but it still
shows the language in a bad light):
* https://codeforces.com/blog/entry/101509#comment-901360
*
https://discuss.codechef.com/t/gdc-compiler-settings-on-codechef/95359
More information about the Digitalmars-d
mailing list