← Back to context

Comment by agentultra

19 days ago

C++ nudges you to think in terms of single elements. Operator overloading, ctors/dtors, references, etc. you pay that cost all over the place.

C programs tend to nudge you into thinking in terms of arrays of data.

For game development you generally want to think this way. The cost of vtables and all the cache misses doesn’t have to be paid. A game has to stream bytes. Many things at once. Rarely single elements at a time.

Only if devs lack the skills to understand what to actually use.

There is this anti-C++ bias that keeps forgetting that using C++ doesn't mean use every feature.

Just like many keep using C as if C89 was latest, and never adopt anything added in the last 30 years.

  • I agree, there is a nice language buried in all the features trying to escape.

    The struggle is that if you choose a subset of the language to use and you have dependencies… well you’re including whatever features they use into your subset.

    I don’t think C++ is a bad language at all or anything. Just that it nudges developers into certain modes of thinking based on the features it chooses to focus on. Might explain why some developers still choose C.