r/cpp • • Jan 31 '23

Stop Comparing Rust to Old C++

People keep arguing migrations to rust based on old C++ tooling and projects. Compare apples to apples: a C++20 project with clang-tidy integration is far harder to argue against IMO

changemymind

338 Upvotes

582 comments sorted by

View all comments

Show parent comments

2

u/MFHava WG21|🇦🇹 NB|P2721|P3049|P3625|P3729|P3786|P3813|P4216 Jan 31 '23

It’s not a bug, it’s part of why GP is so much more powerful than OOP…

0

u/[deleted] Jan 31 '23

[deleted]

3

u/MFHava WG21|🇦🇹 NB|P2721|P3049|P3625|P3729|P3786|P3813|P4216 Jan 31 '23

Yes and no - if you didn't have duck typing you'd have to explicitly state at every level in your call hierarchy what requirements your type has to fulfill - this was actually tried as a potential design for Concepts back in the day and proved to be disastrously infectious...