| |
![Dukc's Gravatar profile Gravatar of Dukc](//www.gravatar.com/avatar/3c55c5c0c2b9288aa21ea9aa3b4b441b?d=identicon&s=32) | Posted by Dukc in reply to Chris J | Permalink Reply |
|
Dukc ![Dukc's Gravatar profile Gravatar of Dukc](//www.gravatar.com/avatar/3c55c5c0c2b9288aa21ea9aa3b4b441b?d=identicon&s=80)
Posted in reply to Chris J
| On Thursday, 7 December 2023 at 19:10:32 UTC, Chris J wrote:
> Today, I stumbled on a blog post where someone used D as a glue language between C++ and Rust, by using the C++ linkage functionality to call C++ code and the ability to manually override the name mangling using pragma(mangle, "…") to call Rust code.
https://www.kdab.com/mixing-c-and-rust-for-fun-and-profit-part-1/
Wow, doesn't Rust have a name mangling override pragma to do this in itself? Honestly I think any language would do well to ad that.
Of course, even if it'd have it D would still be superior in this regard thanks to extern(C++) and ability to use CTFE for the mangled names.
|