Being reading a lot about betterC, but still have some questions
kiboshimo
matheusmvpeixoto at gmail.com
Tue Jul 9 19:54:15 UTC 2024
On Tuesday, 9 July 2024 at 14:38:34 UTC, Lance Bachmeier wrote:
> If you haven't done so, I'd recommend reading the blog posts
> from Walter to get an understanding of why BetterC was
> introduced and how to use it:
> https://dlang.org/blog/category/betterc/
>
>> - betterC does not need glue code to interop with C. Does it
>> achieve this by "gluing" behind the scenes? I've read in a
>> comment somewhere that the ABI is the same, but idk people say
>> lots of things.
>
> You're declaring your D code extern(C), as you can see in
> Walter's blog posts, so yes, you're using the C ABI.
The blog post contextualizes evilrat's comment too. It facilities
code migration because conversion is also easier (given adequate
attention to C's quirks). After that you can start using D
features on top of converted code. That won't help much on my
Wasm use case, but it might, now that I know more about the ABI
thing.
Thank you.
More information about the Digitalmars-d-learn
mailing list