What are (were) the most difficult parts of D?

Ali Çehreli acehreli at yahoo.com
Thu May 12 16:11:41 UTC 2022


On 5/11/22 19:35, zjh wrote:
 > On Wednesday, 11 May 2022 at 05:41:35 UTC, Ali Çehreli wrote:
 >> What are you stuck at? What was the most difficult features to
 >> understand? etc.
 >>
 >
 > I don't know the progress of `interface to C++`.
 > I want to use my C++ functions in `d`.

That direction is easier:

 
https://dlang.org/spec/cpp_interface.html#calling_global_d_functions_from_cpp

(Also see "Using D Classes From C++" on the same page.)

The problem is calling into C++ where C++ templates are involved. As D 
does not include a C++ compiler, it cannot instantiate C++ templates 
automatically. (The programmer must instantiate explicitly as needed on 
the C++ side.)

Ali



More information about the Digitalmars-d-learn mailing list