| ▲ | randomtoast 3 hours ago | ||||||||||||||||
I’ve seen this play out a lot. People say they “write games in C” and then quietly rebuild half of C++ anyway with vtables in structs or giant switch statements, just without the compiler helping. That’s fine if it makes you happier, but it’s not obviously simpler or safer. Also, C++ compile times are mostly a self-inflicted wound via templates and metaprogramming, not some inherent tax you pay for having virtual functions. | |||||||||||||||||
| ▲ | mjburgess 3 hours ago | parent | next [-] | ||||||||||||||||
A switch statement is how you do ad-hoc polymorphism in C -- i dont thinks an own against C developers to point that out. If they wanted to adopt the C++ style that immediately requires the entire machinery of OOP, which is an incredibly heavy price to avoid a few switch statements in the tiny number of places ad-hoc poly is actually needed | |||||||||||||||||
| |||||||||||||||||
| ▲ | sandpaper26 3 hours ago | parent | prev | next [-] | ||||||||||||||||
This reads like an LLM generated response that simply restates the comment it's replying to | |||||||||||||||||
| |||||||||||||||||
| ▲ | uecker 2 hours ago | parent | prev | next [-] | ||||||||||||||||
I think it is simpler and "the compiler not helping" == "things are more transparent".
There are various things one does not have to worry about when using C instead of C++. But the brain needs some time to get used to it. | |||||||||||||||||
| |||||||||||||||||
| ▲ | direwolf20 3 hours ago | parent | prev | next [-] | ||||||||||||||||
It's important that you do these things yourself before you utilise the compiler to do them for you, so you have real understanding. | |||||||||||||||||
| ▲ | gf000 3 hours ago | parent | prev | next [-] | ||||||||||||||||
> but it’s not obviously simpler or safer On top of likely having worse performance. | |||||||||||||||||
| ▲ | 3 hours ago | parent | prev [-] | ||||||||||||||||
| [deleted] | |||||||||||||||||