Is D more cryptic than C++?

Abrahm abe2007 at nospam.net
Wed Nov 30 03:38:46 PST 2011


"bearophile" <bearophileHUGS at lycos.com> wrote in message 
news:jb4rgv$1bi1$1 at digitalmars.com...
> Abrahm:
>
> D is a bigger and more complex language compared to Java. And D gives 
> more freedom compared to Java, so it's a bit easier to write D2 code 
> that's unreadable compared to Java. But compared to C++ I think D code 
> is a bit less cryptic because some of idioms of good C++ are language 
> constructs in D, so they are more easy to see and (hopefully) better 
> enforced by the language. I've seen both unreadable Python code and 
> well readable Perl5 code so in the end it's a lot a matter of how you 
> use it.
>
>
>> I get the feeling that it is from reading the threads in here. Is 
>> there
>> somewhere that has non-trivial D and C++ code that does the same 
>> thing,
>> side by side, so that I can evaluate D better?
>
> I suggest Rosettacode, it contains hundreds of "Tasks", with their 
> translations in many languages, like C++ and D2:
> http://rosettacode.org/wiki/Category:C%2B%2B
> http://rosettacode.org/wiki/Category:D
> There are draft Tasks too:
> http://rosettacode.org/wiki/Category:Draft_Programming_Tasks
>
> Few people are working hard to create hundreds of well written D2 
> implementations of those.
>
> They are tiny programs, so if you look for longer C++ vs D comparisons 
> you will need to look elsewhere.
>

Alright. I probably asked for more than I need anyway with the "side by 
side" thing. An easy to grok small app, but non-trivial and using a 
number of D features would be ideal. 




More information about the Digitalmars-d mailing list