r/cpp • u/elfenpiff • Jun 15 '26
Cross-Language Data Types
https://ekxide.io/blog/cross-language-data-types
Have you ever thought about sharing data across language boundaries without serialization? This blog post highlights the challenges behind this endeavor and how they can be overcome. Note: I'm not the original author of the blog post, but since the author does not have a Reddit account, I post it on his behalf.
19
Upvotes
4
u/Serious-Regular Jun 16 '26
https://learn.microsoft.com/en-us/cpp/cpp/trivial-standard-layout-and-pod-types?view=msvc-170#pod-types
1
u/Low_Breakfast773 Jun 15 '26
Interesting read. Thanks for sharing.
1
u/fdwr fdwr@github 🔍 Jun 15 '26 edited Jun 18 '26
It's weird that something so fundamental as the sized types aren't part of the core language, rather than being nestled under
std. Sadlyimport stdstill requires either explicit inclusion ofstdint.horimport std.compat(which pulls in more than desired) to avoid typing the extrastd::. Granted, I know C's history of loosely defined types (and some hardware that hadn't even settled on bytes being 8 bits), but these days?...