Are there any default dmd optimizations

Walter Bright newshound2 at digitalmars.com
Sun Feb 24 14:28:42 PST 2013


On 2/24/2013 12:57 PM, Andrej Mitrovic wrote:
> On 2/24/13, Jonathan M Davis <jmdavisProg at gmx.com> wrote:
>> Yeah, which just adds the confusion, because all it does is enable debug
>> bocks.
>
> The feature almost doesn't pay its weight. I mean technically you can
> use -version=Debug and then use version(Debug) blocks. All `debug`
> does is saves a little bit of typing.

I should explain the reasoning for this.

I've talked to many C/C++ programming managers. They lament that every C/C++ 
coding group feels compelled to reinvent their own debug macro scheme. This 
makes it pointlessly difficult to share code between groups.

It's not that unlike how pre-C++98 code bases all had their own "string" class.

By baking one scheme into the language, people will rarely feel a need to 
reinvent the wheel, and will go on to more productive uses of their time.



More information about the Digitalmars-d mailing list