C++ Logo


Advanced search

Re: Idea: lambda capture list as ad-hoc structure or named members tuple

From: Raymund Hofmann <hofmannraymund_at_[hidden]>
Date: Sat, 25 Jan 2020 14:07:54 +0700
> Purely personal opinion: the last thing C++ (ATM) needs is yet another
> special syntax with limited applicability...
Isn't the syntax and the semantics rather a logical consequence and
fragment of what is already widely used with lambda captures?
If one uses lambda's extensively he might come to the same desire of using
only the capture functionality of a lambda in the way i described.
I rather would like to hear of profound reasons why this functionality
might be problematic.
We have polymorphism for functions in various handy ways, but polymorphism
for data structures lags somewhat, i would say.
And didn't Bjarne Stroustrup say he wouldn't want to limit users to the
imagination of the language creators?

> I'd rather restart the discussion on lifting the restriction on local
> templates... (aka.
> http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2020/p1988r0.html)
This is also welcome, as i said, but the capture only fragment of a lambda
would still be useful and just a logical consequence of the lambda

> From: Std-Discussion <std-discussion-bounces_at_[hidden]> On Behalf Of
> Raymund Hofmann via Std-Discussion
> Sent: Friday, January 24, 2020 7:23 AM
> To: std-discussion_at_[hidden]
> Cc: Raymund Hofmann <hofmannraymund_at_[hidden]>
> Subject: [std-discussion] Idea: lambda capture list as ad-hoc structure or
> named members tuple

Received on 2020-01-25 01:13:09