Damn C++ and damn D!

Jonathan M Davis jmdavisProg at gmx.com
Sun Feb 5 16:09:42 PST 2012


On Sunday, February 05, 2012 15:49:04 so wrote:
> After some time with D, C++ is now a nightmare for me. (especially on
> generic coding)
> Think about replicating this simple code in C++.
> 
> void fun(T)(T a)
> {
>      static if(cond(T))
>      {
>         auto var = make(a);
>      }
>      else
>      {
>         auto tmp = make(a);
>         auto var = make_proxy(tmp);
>      }
>      ...
> }
> 
> And this is just "one" condition.
> Damn D for introducing these and damn C++ committee for not adopting.

So, basically, D does it way better than C++, but you're forced to continue to 
use C++ after seeing how well D does it, and it's driving you crazy. Yeah, 
that happens to me a lot too.

- Jonathan M Davis


More information about the Digitalmars-d mailing list