Why is D unpopular?

H. S. Teoh hsteoh at quickfur.ath.cx
Wed May 25 19:19:20 UTC 2022


On Wed, May 25, 2022 at 11:56:03AM -0700, Walter Bright via Digitalmars-d wrote:
> On 5/24/2022 4:26 AM, Adam D Ruppe wrote:
> > It is a terrible switch that does random bad things.
> 
> Back in the olden daze, I've seen magazine compiler benchmark articles
> trash various compilers for poor runtime performance. It nearly always
> boiled down to the journalist not using the right switches for release
> builds.
> 
> So I'm leery of not being able to turn off the runtime checks to get
> max performance.

Unfortunately, we're not living in the olden daze anymore.  We're living
in days of widespread exploitation of out-of-bounds memory accesses,
buffer overflows, and other such things by malicious entities.  These
days, what the internet equivalent of magazines trash is no longer poor
raw performance, but the lack of security features that prevent these
sorts of exploits.

Slices and @safe were the right direction towards the future; -release
disabling all bounds checks is regressing towards bygone days that are
better left forgotten.  Unfortunately, -release negates much of the
benefits the former gives us.


> Besides, it provides a way of accurately measuring how much the
> runtime checks are costing.

I wouldn't be against an explicit switch to disable bounds checks for
when you want to measure this.  But it should not be the default
behaviour of -release. It should be called -disable-all-checks or
something along those lines.  In this day and age, nobody should release
software without bounds checks anymore.  We're no longer living in the
70's.  Just browse through the latest CVEs and see how frequently the
lack of bounds checks in C/C++ leads to all sorts of recurring security
holes and exploits.  Plugging those holes matter far more than the
bragging rights of "winning" some petty benchmarks.


T

-- 
It is of the new things that men tire --- of fashions and proposals and improvements and change. It is the old things that startle and intoxicate. It is the old things that are young. -- G.K. Chesterton


More information about the Digitalmars-d mailing list