2 ms·
C++ has things like the fragile base class problem meaning you can accidentally break it easily. There's issues with throwing exceptions across different librar
by astrange 4y ago
C++ has things like the fragile base class problem meaning you can accidentally break it easily. There's issues with throwing exceptions across different libraries on some platforms (maybe just Windows?) but I forget the reason why.
p is short for predicate.
- pjmlp 4y agoFragile base class problem affects all languages that offer some kind of inheritance, not only C++.
- valleyer 4y agoYou are of course correct in a broad sense. However, when the discussion already mentions "ABI contracts", they're probably referring specifically to the "fragile binary interface problem" (especially regarding member field access), which does not affect all languages that offer inheritance. As the Wikipedia article mentions, this more specific problem is (confusingly) often referred to just as the "fragile base class problem". https://en.wikipedia.org/wiki/Fragile_binary_interface_problem https://en.wikipedia.org/wiki/Fragile_binary_interface_probl...
- pjmlp 4y agoIt still affects all compiled languages that offer inheritance, and OOP ABIs like COM.
- valleyer 4y agoMaybe I'm still misunderstanding you, but (modern) Objective-C is an example of a compiled language without the fragile base class ABI problem. (It pays for this with extra indirection at runtime, of course: ivar accesses must first look up their runtime-resolved offset.)