Originally posted by DavidBrown
View Post
Single-use lambdas are one of the more common tricks for enabling SSA, at least in modern C++. I've gone there, but usually not. Heavy use of lambdas can add a lot of complexity to the code, since they tend to look like nested scopes but aren't.
Originally posted by DavidBrown
View Post
Originally posted by DavidBrown
View Post
So, I've come to regard const member functions as something that pays biggest dividends on simple types. For sufficiently complex objects, if there's not an obvious and intuitive case for const-ness, I default to making methods non-const.
Meanwhile, some C programmers are certainly laughing at such consternation over these problems the C++ community has seemingly invented for ourselves. However, I'd argue these sorts of debates typically reveal deeper truths about code structures which they can only blunder through, in an indirect way, if only because their language doesn't give them a simple means of discussing these concepts in the abstract. It's a slight stretch, but I think linguistics tells us it's difficult to reason about concepts that a (spoken) language provides no easy way of expressing.
Originally posted by DavidBrown
View Post
Originally posted by DavidBrown
View Post
Originally posted by DavidBrown
View Post
Comment