On Saturday, 13 July 2024 at 05:35:53 UTC, Walter Bright wrote:
> Why -release is the way it is:
I got sick of journalists running benchmarks using compilers they weren't familiar with. They never spent any effort learning what the switches were.
The big vendors would wine and dine them and show them exactly how to run their compilers. With mine, they never talked to me. I wouldn't even know they did a review until it hit the news stand.
They'd use the wrong switches, the code would run slow, and I'd get a bad review.
The -release switch means "make the fastest code". Make it easy for the journalists to do the right thing.
Nobody new to D will know to use -O -boundscheck-safeonly -inline. They'll just get a "D is slow" result and move on.
I think it's fair to say no "journalists" are reviewing D in print. For sure, people who try to run benchmarks will at least look for the proper optimization flags, and I bet nobody is looking to remove bounds checks.
Let's just remove it. What it does now is fool people into thinking this is for when you want to release your library/application. If nothing else, it should be renamed to -removesafetychecks or something.
Note, I was wrong about the -O and -inline being implied -- you still have to put those in. -release just gets rid of all the safety checks.
-Steve