Example within documentations of D seriously need some improvement.

Andrej Mitrovic andrej.mitrovich at gmail.com
Fri May 27 06:22:01 PDT 2011


On 5/27/11, Matthew Ong <ongbp at yahoo.com> wrote:
> http://www.digitalmars.com/d/2.0/operatoroverloading.html # people done
> C++ can understand others may not.

Well, explaining the concept of operator overloading should be a
separate topic. People who know what operator overloading is will look
in the language docs to figure out the syntax and use it right away.

Doesn't Java have operator overloading? A lot of popular languages
except maybe C have it, I think.

> http://www.digitalmars.com/d/2.0/template-mixin.html

This could definitely be improved. There's too much foo's and bar's
intertwined with mixins.

> http://www.digitalmars.com/d/2.0/traits.html

Not sure what's wrong here.

> http://www.digitalmars.com/d/2.0/statement.html#ScopeGuardStatement

I think the point of those numbers was to make it easy to figure out
which statements were  executed in sequence. It doesn't demonstrate
where you would need a scope guard, so maybe another example could be
added or these ones rewritten a little bit.


More information about the Digitalmars-d mailing list