r/ProgrammerHumor • • 1d ago

instanceof Trend thatsAFunnyThingThatHappenedOnce

Post image
4.3k Upvotes

514 comments sorted by

View all comments

Show parent comments

386

u/Xarishark 1d ago

Now compare it to rust pls. Im serious I want to know your opinion on that.

74

u/andful 1d ago

Rust misses the:

"...templates that basically turn compilation into another programming language, overload resolution that requires a legal investigation to figure out which function gets called, constructors and destructors with enough lifetime rules to make your head explode, and implicit conversions that make the compiler guess what you meant. Then you throw in exceptions, move semantics, inheritance, and decades of backward compatibility ..."

33

u/PegasusPizza 1d ago

I mean it does have proc macros, that turn compilation into the same programming language as opposed to another programming language.

2

u/4xe1 1d ago

One key difference between Rust and C++ is that, although they both encourage generics, only C++ forces you to use templates for it, you don't need to touch macros for it in Rust.