Re:I write games in C (yes, C)
by card_zero on Saturday February 07, 2026 @08:09PM
(#46930263)
C++ reimplements a lot of the things we do in C with function pointers, while hiding what's actually happening behind topheavy syntax that implies a 1990s object oriented paradigm that's dead now.
[ Parent
| on HN ]
Re:I write games in C (yes, C)
by direwolf20 on Saturday February 07, 2026 @08:14PM
(#46930313)
Contrary to popular belief C++ isn't really object–oriented. I mean, you can write object–oriented code, but the language doesn't make assumptions about what goes into a class. It's really just a struct with associated functions.
That's an odd opinion about a language with a lot of class related features. I can only assume you have a very strong definition of OOP.
Re:I write games in C (yes, C)
by direwolf20 on Saturday February 07, 2026 @09:07PM
(#46930626)
OOP doesn't mean that your language has a "class" keyword, nor dot notation for calling functions.
I enjoyed the pragmatic historical definition of OOP given in https://www.youtube.com/watch?v=wo84LFzx5nI where essential it can be seen as subtype polymorphism
> It's really just a struct with associated functions.
If that were actually true C++ would be a lot easier to accept as a 'C successor'. Instead you have the implicit this-pointer, complicated rules for which constructor or operator overload is actually called, a hidden vtable pointer (not to mention multiple inheritance), then you have public/private/protected, override vs final, const methods (which wouldn't be needed as a separate syntax feature if the this arg wouldn't be implicit) etc etc etc... that a lot of OOP-baggage which a lot of C++ coders probably don't even notice anymore.
A plain C struct with function pointers does indeed make a lot more sense than all the OOP-ism that C++ hides from you ;)
Re:I write games in C (yes, C)
by direwolf20 on Sunday February 08, 2026 @10:55AM
(#46935384)
It has lots of optional features, none of which make it an object–oriented language. It's an everything–oriented language. It has lambda syntax for functors, but you're not calling it an impure–functional programming language. Virtual functions are one feature, which is useful in pseudo–object–oriented code.
how is OOP dead if tons of code keep being written using OOP these days? From anything corporate in Java/C# to Hyprland C++