3 ms·
Poor man's lazy evaluation. I'm sure they'll try to shoehorn monads in somehow with C++23
by voldacar 7y ago
Poor man's lazy evaluation. I'm sure they'll try to shoehorn monads in somehow with C++23
- afranchuk 7y agoI'm not sure what lazy evaluation had to do with it... but it's something that will be much easier when concepts are in the language with C++20.
- kadoban 7y agoIt's not lazy evaluation at all. Lazy evaluation is a runtime thing, where you delay evaluating an expression until you actually need to. This concept is operators that will never evaluate the expressions they operate on. sizeof is the oldschool obvious one, sizeof(foo()) never runs the function foo. It's just a way of querying the static properties of an expression, asking specific things about its type in a way. They're not new things in C++. sizeof has been around since the beginning.