Are there any default dmd optimizations

Jacob Carlborg doob at me.com
Tue Feb 26 02:50:41 PST 2013


On 2013-02-26 08:56, foobar wrote:

> DDoc isn't part of the language but rather part of the compiler,
> nevertheless it has its downsides. Being part of the compiler means that
> the compiler needs to be changed to address those and it isn't even
> written in D! The end result is all sort of additional auxiliary D
> utilities to post-process this in order to address some of those issues.
> Hence, A prime example of the failure that I'm talking about.

Having to use the JSON output to generate documentation just shows that 
DDoc is lacking.

> unittest is worse, it is indeed part of the language so now the
> _language grammar_ needs to be changed to fix the problems with it, such
> as not having test names. A far better solution practiced in all other
> major languages is to use annotations and in fact, there probably
> already are similar D frameworks, thus exhibiting the same problem of
> multiple conflicting implementations you wished to avoid.

There are already several testing frameworks for D. The only thing I 
think the "unittest" keyword is useful for, is creating a block where to 
put the code. The rest will my framework handle.

> Additional such problems - the AA issue which has been going own for
> years now. The endless discussions regarding tuples.
> It seems that D strives to bloat the language with needless features
> that really should have been standardized in the library and on the
> other hand tries to put in the library things that really ought to be
> built into the language to benefit from proper integration and syntax.
>
> The latest case was the huge properties debate and its offshoots
> regarding ref semantics which I didn't even bother participate in.
> Bartosz developed an ownership system for D to address all the safety
> issues raised by ref *years ago* and it was rejected due to complexity.
> Now, Andrei tries to achieve similar safety guaranties by giving ref the
> semantics of borrowed pointers. It all seems to me like trying to build
> an airplane without wings cause they are too complex. Rust on the other
> hand already integrated an ownership system and is already far ahead of
> D's design. D had talked about macros *years ago* and rust already
> implemented them.

I agree in general.

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list