digitalmars.D.learn - Can you access the same classes from C++ and D and vise versa, or do
- Daniel Donnell, Jr (11/11) Sep 10 2022 https://dlang.org/spec/cpp_interface.html
- =?UTF-8?Q?Ali_=c3=87ehreli?= (10/12) Sep 10 2022 At DConf, Manu indicated that that page is outdated and that D's C++
- zjh (2/6) Sep 10 2022 Update it quickly, This is a big selling point.
- Daniel Donnell, Jr (3/11) Sep 12 2022 So what is the answer here? I'm not sure what they were getting
- Tejas (4/17) Sep 13 2022 You can
- Sergey (3/3) Sep 12 2022 Pretty new video from ContextFreeCode covers interop with C++
https://dlang.org/spec/cpp_interface.html According to that C++ / D .object files can interoperate both ways, but one has to be compiled before the other, order depending on direction. My question is, can you have a class C (C++) use a class D (Dlang) in such a way that D can also use C as in the article? I'm guessing using all pointers on the C++ side might work. I have never gotten rid of cyclical dependencies in C++ other than putting a bunch of classes in the same file, but in D, cyclic dependency is resolved beautifully somehow, so I can split up my classes into each their own d-module.
Sep 10 2022
On 9/10/22 13:04, Daniel Donnell wrote:https://dlang.org/spec/cpp_interface.htmlAt DConf, Manu indicated that that page is outdated and that D's C++ support is actually a lot better. He kind-of-promised to update that page but I doubt it happened yet if ever. :)one has to be compiled before the other, order depending on direction.I don't think that's correct. The page is unfortunately unclear: "the first with a C++ compiler, the second with a D compiler" could have better been written as "the C++ source file with a C++ compiler, and the D source file with a D compiler" Ali
Sep 10 2022
On Saturday, 10 September 2022 at 22:07:32 UTC, Ali Çehreli wrote:On 9/10/22 13:04, Daniel Donnell wrote:Update it quickly, This is a big selling point.https://dlang.org/spec/cpp_interface.htmlAt DConf, Manu indicated that that page is outdated and that D's C++ support is actually a lot better.
Sep 10 2022
On Sunday, 11 September 2022 at 02:14:51 UTC, zjh wrote:On Saturday, 10 September 2022 at 22:07:32 UTC, Ali Çehreli wrote:So what is the answer here? I'm not sure what they were getting at...On 9/10/22 13:04, Daniel Donnell wrote:Update it quickly, This is a big selling point.https://dlang.org/spec/cpp_interface.htmlAt DConf, Manu indicated that that page is outdated and that D's C++ support is actually a lot better.
Sep 12 2022
On Tuesday, 13 September 2022 at 03:13:59 UTC, Daniel Donnell, Jr wrote:On Sunday, 11 September 2022 at 02:14:51 UTC, zjh wrote:You can https://stackoverflow.com/a/53710273On Saturday, 10 September 2022 at 22:07:32 UTC, Ali Çehreli wrote:So what is the answer here? I'm not sure what they were getting at...On 9/10/22 13:04, Daniel Donnell wrote:Update it quickly, This is a big selling point.https://dlang.org/spec/cpp_interface.htmlAt DConf, Manu indicated that that page is outdated and that D's C++ support is actually a lot better.
Sep 13 2022
Pretty new video from ContextFreeCode covers interop with C++ D also mentioned there :) https://youtu.be/RdypYCxhWtw
Sep 12 2022