python vs d

Craig Dillabaugh via Digitalmars-d digitalmars-d at puremagic.com
Thu Apr 24 00:45:07 PDT 2014


On Thursday, 24 April 2014 at 06:38:42 UTC, Suliman wrote:
> I am following discussions about GC and some other 'critical' 
> improves in D language for a long time. I see a lot of 
> arguments and heaps of code, that often hard to understand (for 
> example Templates) even more complicated to use it.
>
> I like D, but more and more I am playing with Python, and 
> understanding it's philosophy. And I like it because it's do 
> not have any overhead like C++. It's clean any easy to 
> understanding. As result it's harder to write bad code in it.
>
> Does anybody make tests of speed most common algorithm in D and 
> Python. I am trying to understand which project better to start 
> in Python and which in D.

In my experience alot of the code you see popping up on this 
forum is from people who are interested in developing reusable 
libraries (parts of Phobos) and pushing the limits of D.

To accomplish some task in D, I would suggest that the normal D 
code would (could) look a lot closer to the Python code 
performing the same task, than much of what you see posted on 
here.

Most of my D code looks nothing like what you see posted on these 
lists. I likely don't write code in the idiomatic D way, but it 
still works and is a lot easier on the eyes than my C++ code.

I think improving the library documentation and some parts of the 
library (ie. XML, JSON a few others) would likely help close the 
gap with Python in terms of 'ease of use'.  Of course it will 
likely never be as easy as Python for quick and dirty apps. 
However, just because you can do crazy complex stuff in D doesn't 
mean you have to.


More information about the Digitalmars-d mailing list