4 ms·
Err I always thought it looked strange because it was in C with classes before or after some holy war. While gcc (and in general compiler) plugins are some of
by touisteur 4y ago
Err I always thought it looked strange because it was in C with classes before or after some holy war.
While gcc (and in general compiler) plugins are some of the most interesting tech enablers (be it for fuzzing,, static analysis, or runtime checks injection) 'People competently maintaining gcc plugins' (a sect I'm not a part anymore, thank dog) are amongst the most patient, devoted, unsung angels of this world.
- astrange 4y agoIt’s in C++ now. The weird spacing and functions ending in _p are Lispisms. It’s also garbage collected so it’s still not “normal” C++ but neither is LLVM. Not sure about the plugin API, but C++ is basically impossible to use with plugins because it’s so hard to keep ABI contracts, so it might not have changed.
- UncleEntity 4y agoIsn’t the compiler the one who makes the ABI contract? And I’ve seen _p and friends all over the place usually to differentiate between a pointer and, umm, not pointer. I thought it was a C++ism to be honest.
- astrange 4y agoC++ 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.)
- touisteur 4y agoWell you basically have to compile the plugins against your gcc's headers anyway, and they're gpl by default (same as wireshark dissectors iirc). No the pain is all the churn on gcc internals and in plugin APIs over the years. You basically become an ifdef monkey and end up testing myriads of gcc versions...