auto isn’t dynamic typing it’s just type inference.
I’m aware, but one of the big arguments I’ve heard about dynamic typing is “I don’t know which type it has when I read the code”. Well, auto looks just like var in that regard.
Lambdas are just a way of defining methods in place. It has nothing to do with callbacks.
Callback definition from wikipedia:
In computer programming, a callback is a function that is stored as data (a reference) and designed to be called by another function – often back to the original abstraction layer.
This is exactly what lambdas are often used for in C++.
Keyword being “shouldn’t”. C++ doesn’t care about that, it just hands you the loaded gun.
Anti Commercial-AI license