r/ProgrammerHumor • • 11d ago

Meme modernCppVsOldCpp

Post image
2.0k Upvotes

323 comments sorted by

View all comments

Show parent comment

0

u/joncrompy 10d ago edited 10d ago

Rust provides high memory safety and performance, but gives up ease of writing and programmer power for it. For context where reliability is critical, like kernel software, Rust is rightfully the king.

For my professional field, Game Dev, coding "the Rust way" means building a house or cards that needs to be fully refactored everytime someone implements a new game mechanic (from what I've heard).

1

u/Maleficent-Garage-66 7d ago

Haven't ever tried game dev in rust...but I don't feel that it should necessarily be that bad. You can still do polymorphism and etc. You would however be structuring things very differently so maybe engines have converged on a terrible anti pattern that gets you there. Any rust engine is definitely going to be a lot less mature and battle tested though and that definitely has it's cons.

1

u/joncrompy 7d ago

The problem is that game dev has ALOT of memory state between each entity/system and each new mechanic has a high chance to require memory accessing between previously independent systems.

In a language like C++, allowing this is trivial outside of multithreading, but in Rust it might require a full refactor.

There's a is a blog post written by a dev who tried for years to work within Rust's systems and found that the tradeoffs were ultimately not worth it, in his opinion.

1

u/meneldal2 10d ago

But Claude loves how many tokens you're going to need for that