Damn C++ and damn D!

deadalnix deadalnix at gmail.com
Mon Feb 6 13:33:29 PST 2012


Le 06/02/2012 01:09, Jonathan M Davis a écrit :
> 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

Hopefully, we have compiler/phobos bugs to force us to get back to C++.


More information about the Digitalmars-d mailing list