2 ms·
With the complexity and the performance cost considered, I don't think there is a piece of code that is worth writing in C++ that also don't need to care about
by okanat 2y ago
With the complexity and the performance cost considered, I don't think there is a piece of code that is worth writing in C++ that also don't need to care about types.
auto introduces quite a bit complexity to already complex C++ code. It behaves completely differently in lambdas. Using it as the return types usually causes implicit and costly conversions. Using it with primitive types is basically a booby trapped temple for juniors who didn't burned numerous times and mere mortals who don't have time to learn cppreference by heart.
If I don't care about types, I would use a higher level language.
Yes a compiler will give warnings and whatnot, given you have a modern enough one and somehow constantly running it. It is costly in time though. CI builds are not free. Developer time is less so.