| >> A large majority of the code running on our planet today is OOP. > Good example code base? It would be easier to give examples of non-OOP crucial programs, for they are far less. OOP codebases:
-- Almost all major AAA games. -- Almost all GUI systems. -- All major browsers. -- Almost all video editors (NLE), -- Almost all audio DAWs -- All of Adobe's Suite -- Almost all 3D and CAD tools -- All office suites (MS Office, OpenOffice, iWork), -- All major IDEs (Visual Studio, IntelliJ, XCode, Eclipse) -- Most of Windows and OSX standard libraries -- Clang (and GCC now that they went to C++? Not sure if they use OOP) -- the JVM need we go on? |
Nah. As far as I hear, most of them moved away from OOP a long time ago. "Component systems" have been hot for more than five years.
> Almost all GUI systems
Come on, what a GUI does vs a non-GUI "realtime" app is pretty trivial. A bit of layouting, routing a few input events. I'm not saying that e.g. building a scene graph or box model would be the wrong thing (there are other ways as well), but yeah... I certainly don't think that inheritance makes GUIs easier. Interfaces/Function pointers/dynamic dispatch? Yes, you might want that for decoupling a few containers of heterogeneous data/behaviour. But that's hardly a monopoly of "OOP", and also you don't need that in most places.
The other projects, don't know them. Again, I'm not against abstractions per se (the Stream abstraction is one I regular use, although it does require unwrapping for proper error handling. And I have a constant number of "objects" in each of my programs, namely modules with global data). But OOP culture, especially objects-first mentality and fine-grained data encapsulation, gluing implementation to pristine data - I believe it does only harm and leads to plain wrong program structure and overcomplicated code to jump into all these boxes. I prefer gliding through arrays :-)