Re:The C++ standard for the F-35 Fighter Jet [video]
by uecker on Sunday December 07, 2025 @05:54PM
(#46186157)
A multi-inhertiance system is certainly not something somebody who "was thinking in C" would ever come up with. This sounds more like a true C++ mess.
[ Parent
| on HN ]
Re:The C++ standard for the F-35 Fighter Jet [video]
by throwaway2037 on Sunday December 07, 2025 @06:34PM
(#46186537)
I worked on a pure C system early in my career. They implemented multiple inheritance (a bit like Perl/Python MRO style) in pure C. It was nuts, but they didn't abuse it, so it worked OK.
Also, serious question: Are they any GUI toolkits that do not use multiple inheritance? Even Java Swing uses multiple inheritance through interfaces. (I guess DotNet does something similar.) Qt has it all over the place.
Re:The C++ standard for the F-35 Fighter Jet [video]
by nottorp on Sunday December 07, 2025 @06:45PM
(#46186606)
One could say toolkits done in C++ use multiple inheritance because C++ doesn't have interfaces though.
Re:The C++ standard for the F-35 Fighter Jet [video]
by throwaway2037 on Friday December 12, 2025 @03:16AM
(#46241975)
This is a good point. It would be better for me to say pure abstract base classes... that simulate interfaces in C++. That said, I can say from experience that Qt does more than multi-inheritance with pure abstract base classes. I think the QPainter class is mixed into a few places, and that class is fuckin' major -- it is responsible to paint every (cross platform) pixel in the whole framework.
Re:The C++ standard for the F-35 Fighter Jet [video]
by aninteger on Sunday December 07, 2025 @10:20PM
(#46187923)
The best example I can think of is the Win32 controls UI (user32/Create window/RegisterClass) in C. You likely can't read the source code for this but you can see how Wine did it or Wine alternatives (like NetBSD's PEACE runtime, now abandoned).
Actually the only toolkit that I know that sort of copied this style is Nakst's Luigi toolkit (also in C).
Neither really used inheritance and use composition with "message passing" sent to different controls.
Re:The C++ standard for the F-35 Fighter Jet [video]
by WD-42 on Sunday December 07, 2025 @10:38PM
(#46188011)
GTK does not support multiple inheritance afaik.