News for hackers. Stuff that matters.
Re:Goodbye, Rust. I wish you success but I'm back to C++ (so... by Maxatar on Thursday November 28, 2024 @08:18PM (#42269957)
Refactoring C++ is an absolute nightmare due to templates and overloading. If you rename a function for example, tools can't propagate that change through a template because there's no way to know if that template is only ever used to call that particular function, and not some other function that happens to share the same name (some overload).

Another way to think of it is that in C++, templates are dynamically typed, and so templates suffer from all of the same refactoring problems that dynamically typed languages do.

In Rust that problem doesn't exist, there is no function overloading and generics are "statically-typed" via traits, so you can factor code that resides within generics just as you would refactor any other code and it all just works.

Re:Goodbye, Rust. I wish you success but I'm back to C++ (so... by tcfhgj on Thursday November 28, 2024 @10:01PM (#42270419)
You probably are looking for duck typing