DEV Community

Discussion on: What Does C++ Do That Rust Doesn't?

tuned profile image
Lorenzo (Mec-iS)

C++ templates were introduced in C++11 and I still don't know if are inspired or instead inspired generics in Rust. Reconstructing the historical process is also somehow important.

deciduously profile image
Ben Lovy Author

C++11 introduced variadic templates, but non-variadic templates existed before then. Each successive release has extended the feature set significantly, though. Generics are seemingly universal, I think it would be tricky to pinpoint a "chicken-or-egg" moment between Rust and C++.