|
|
|
|
|
by wasmperson
110 days ago
|
|
> lambda expressions can only be passed to template functions > there is no way to explicitly refer to the compiler-generated name for the lambda type. "Voldemort" types. While intellectually I get the explanation for why C++/Rust lambdas are like this, I still strongly dislike them. Occasionally being unable to even articulate what something is feels like a failure in language design. C recently got type inference via the "auto" keyword and it seemed like almost immediately there was a proposal to add voldemort types to the language. |
|
Anyway, I don't see it mentioned anywhere in this discussion, but imo the area where c++ lambdas shine is the way they interact with copy constructors and move constructors.