complex arithmetic in D: multiple questions

bachmeier no at spam.net
Fri Mar 9 16:53:21 UTC 2018


On Friday, 9 March 2018 at 14:41:47 UTC, J-S Caux wrote:

> Going further, I'm really wondering what the plan is as far as 
> Complex is concerned. Right now it just feels neglected 
> (half-done/aborted transition from creal etc to Complex, lots 
> of missing basic functions etc), and is one major blocking 
> point as far as adoption (among scientists) is concerned. Julia 
> is really taking off with many of my colleagues, mostly because 
> due respect was given to maths. I'd certainly choose Julia if 
> it wasn't for the fact that I can't get my exploratory/testing 
> codes to run faster than about 1/10th of my C++ stuff. It seems 
> D could have such an appeal in the realm of science, but these 
> little things are really blocking adoption (including for 
> myself).

I don't do the things you're doing (I do econometrics) but I 
don't think that at this point D is ready to be used as a 
complete solution for everything you need. It can be done, but 
someone has to do the work, and that hasn't happened. D is 
designed to be fully interoperable with C and mostly 
interoperable with C++. You'll get the same performance as C, but 
that doesn't help if the libraries you need haven't been written 
yet.

 From a practical perspective (i.e., you want to just work without 
writing a bunch of low-level stuff yourself) it's best to prepare 
to call from D into C/C++ or from C/C++ into D. This hybrid 
approach has worked well for me, and to be honest, I'd rather 
rely on well-tested, well-maintained C libraries than worry about 
pure D libraries that haven't been tested extensively and may or 
may not be maintained in the future. It really doesn't matter to 
your own code if the function you're calling was written in C or 
written in D.

As for Julia, that was created as a Matlab replacement, and they 
have full-time devs to work on it. If I were starting over, I 
would consider Julia for my own work. I'd probably still choose D 
but Julia does offer advantages.


More information about the Digitalmars-d-learn mailing list