On Saturday, 4 November 2023 at 12:01:11 UTC, Emmanuel Danso
Nyarko wrote:
[...]
So C-strings are just an array of characters that are governed
by simple functions and D strings also defined the same. So you
could see that D strings are possibly built on the architecture
of C strings. In C++, string is a complex standard template
library that generates complex symbols and cannot be mapped as
it is based on a standard library implementation.
I don't think the strings are being translated in any way when we
change the linkage. Strings in D are dynamic arrays of chars, the
C binding code is giving us a template representing D's dynamic
arrays, and so I thought that we could also use it in C++ for
interoperability with D dynamic arrays.