C++ interop - what to do about long and unsigned long?

bachmeier via Digitalmars-d digitalmars-d at puremagic.com
Fri Sep 12 07:15:32 PDT 2014


On Thursday, 11 September 2014 at 15:39:08 UTC, Sean Kelly wrote:
> On Thursday, 11 September 2014 at 00:29:37 UTC, Andrei 
> Alexandrescu wrote:
>> On 9/10/14, 4:16 PM, bachmeier wrote:
>>
>>> Clearly Walter and everyone should work on whatever they 
>>> think is important. I hope your statement doesn't imply that 
>>> all development effort is going to be put into C++ 
>>> compatibility.
>>
>> Ideally it would.
>
> Is C++ interop really that important or is it another one of 
> those "if D had this, *then* I would use it!" dismissals.  C 
> interop is clearly crucial.  Operating system interfaces are 
> written in C, and not being able to call C functions is hugely 
> limiting.  But C++?  I honestly can't envision a situation 
> where I would actually care about C++ interop.  Is this truly a 
> blocker for some people?  Like an actual, honest blocker and 
> not just a false flag?

For numerical computing, C++ interop would be huge. Scientists, 
statisticians, and economists don't want to write or even learn 
C++, but currently there is little choice. Here are a few 
examples off the top of my head:

- Rcpp is the most popular dependency in R. It allows for easy 
embedding of C++ code in R.
- RInside makes it easy to embed R in a C++ program.
- Octave is written in C++ and extensions are easiest to write in 
C++.
- Armadillo is a linear algebra library.
- Eigen does linear algebra, non-linear optimization, and 
estimation.
- CERN's ROOT is written in C++.

No matter the claims about how much of an improvement C++11/C++14 
are, the learning curve with D is much smaller. If you want to 
make a newbie hate their career choice, tell them "you can do 
that using Boost" or "that uses template metaprogramming".


More information about the Digitalmars-d mailing list