Embed Notice
HTML Code
Corresponding Notice
- Embed this notice@RustyCrab @iancho @GoodPerson @bot @kroner @Hoss @icscarythings A lot of differences are just programming styles, and you can definitely mix them. With C++, I tend to use OO because I'm working with QT libraries or gamedev and stuff. OO actually works for quite a lot of things, it's businesses that tend to just abuse the hell out of it and shit like Java introducing "factory" classes are a thing that really hurts. Even QT sometimes abuses it but its for really small things, I personally have never minded having to "unwind" inheritance especially since documentation solutions for such a thing 100% exist.
One of the things I hate with C is the global state abuse with errno and shit, it's like a little virus that affects any threaded code and stuff. OO in my opinion actually solves it since you can easily maintain state in the "type" without having to mangle structs and pointers and shit, since state was mostly abused to solve some of the issues in C of creating your own state holders and simplify it. Look at OpenGL and Vulkan for example, see how OpenGL uses so much global state and has so many ties to C (by design)? It is mostly a hack.