D for project in computational chemistry

bachmeier via Digitalmars-d digitalmars-d at puremagic.com
Sun Aug 2 14:43:38 PDT 2015


On Sunday, 2 August 2015 at 16:25:18 UTC, Yura wrote:
> I just wander how D would be suitable for my purpose? Please, 
> correct me if I am wrong, but in D the need of pointers is 
> minimal, there is a garbage collector, the arrays can be 
> dynamically allocated, the arrays can be sliced, ~=, etc which 
> makes it similar to python at some extent. I tried to write a 
> little code in D and it was very much intuitive and similar to 
> what I did both in Python and C.

If you can do it in C, you can do it in D. Full stop.

You get a lot of nice additional features with D, and unlike C++, 
there are not a thousand ways to shoot yourself in the foot with 
a hundred line program. You can easily call C libraries from D so 
you lose nothing wrt to legacy C code. You can use pyd to 
interoperate with Python, so you can move as quickly or as slowly 
as desired from Python to D. You can even call D from C, so if D 
doesn't work out, you don't lose the code you've written.

I primarily use R but have been moving a lot of code into D for 
speed and the nice language features for two years now, and I 
have no regrets. When I started with D, I read lots of comments 
about the compiler being buggy, but have yet to encounter a 
compiler bug. Thankfully that myth seems to be dying.


More information about the Digitalmars-d mailing list