Are there any default dmd optimizations

Andrej Mitrovic andrej.mitrovich at gmail.com
Tue Feb 26 10:41:13 PST 2013


On 2/26/13, foobar <foo at bar.com> wrote:
> Rust on the other hand already
> integrated an ownership system and is already far ahead of D's
> design.

Far ahead? It allows things like local variables shadowing earlier declarations:

let monster_size = monster_factor * 10.0;
...
let monster_size: int = 50;

That's straight from the tutorial. When has anyone thought to
themselves "I need a new variable to store some result to, but damn, I
wish I could use an existing name but use it to store a completely
different type". That is an incentive to write unreadable code.

And then there are things like this:

"Note that, if applied to an integer value, ! flips all the bits (like ~ in C)."

So (!2 == true)?

There are plenty of complaints for both languages (it's only natural),
but saying that Rust is somehow far ahead, I don't buy that one bit.
It's all too easy to cherrypick features which are in one language and
not in the other.


More information about the Digitalmars-d mailing list