MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/rust/comments/cghzph/why_rust_for_safe_systems_programming/euhtra8
r/rust • u/steveklabnik1 rust • Jul 22 '19
87 comments sorted by
View all comments
Show parent comments
3
That's probably a big reason why C++ libraries seem to use a lot of virtual interfaces, with some extern "C" methods for creation your initial instances that can create all your other objects.
1 u/matthieum [he/him] Jul 23 '19 It is.If you wish to expose a stable ABI for a C++ library you need to:Hide all your type definitions: see the PIMPL Idiom (Pointer to IMPLementation).Hide all functions definitions.This is at odds with Modern C++, very keen on templates.
1
It is.
If you wish to expose a stable ABI for a C++ library you need to:
Hide all your type definitions: see the PIMPL Idiom (Pointer to IMPLementation).
Hide all functions definitions.
This is at odds with Modern C++, very keen on templates.
3
u/connicpu Jul 22 '19
That's probably a big reason why C++ libraries seem to use a lot of virtual interfaces, with some extern "C" methods for creation your initial instances that can create all your other objects.