Lambda expression comparison between C++11, C++14 and C++17
maitesin.github.io
Lambda expression comparison between C++11, C++14 and C++17
1–10 of 87 posts
Re: Lambda expression comparison between C++11, C++14 and C++17
#2Ah well, that's just the C++ way I suppose.
Makes me glad for Rust, that's for sure!
Re: Lambda expression comparison between C++11, C++14 and C++17
#3This is the first time I've looked at C++ lambdas. They appear magnificently powerful and also like another pile of easy ways to get completely screwed up. Ah well, that's just the C++ way I suppose. Makes me glad for Rust, that's for sure!
Re: Lambda expression comparison between C++11, C++14 and C++17
#4This is the first time I've looked at C++ lambdas. They appear magnificently powerful and also like another pile of easy ways to get completely screwed up. Ah well, that's just the C++ way I suppose. Makes me glad for Rust, that's for sure!
What do you mean? Only time you can mess up a lambda is if a pointer that you're using gets changed. And this kind of dupicate ownership is a general problem with pointers.
FWIW nothing about them is much different from Rust's approach(anon struct + fn) it's all the ownership guarantees which give Rust it's safety.
Re: Lambda expression comparison between C++11, C++14 and C++17
#5This is the first time I've looked at C++ lambdas. They appear magnificently powerful and also like another pile of easy ways to get completely screwed up. Ah well, that's just the C++ way I suppose. Makes me glad for Rust, that's for sure!
I really like the explicit capture of C++'s lambdas more than the implicit one in most other languages (C#, Java, Python...) where you easily ends-up with a closure not referencing the expected variable. See: https://blogs.msdn.microsoft.com/ericlippert/2009/11/12/clos...
Re: Lambda expression comparison between C++11, C++14 and C++17
#6This is the first time I've looked at C++ lambdas. They appear magnificently powerful and also like another pile of easy ways to get completely screwed up. Ah well, that's just the C++ way I suppose. Makes me glad for Rust, that's for sure!
What do you mean? Only time you can mess up a lambda is if a pointer that you're using gets changed. And this kind of dupicate ownership is a general problem with pointers.
Re: Lambda expression comparison between C++11, C++14 and C++17
#7Re: Lambda expression comparison between C++11, C++14 and C++17
#8This is the first time I've looked at C++ lambdas. They appear magnificently powerful and also like another pile of easy ways to get completely screwed up. Ah well, that's just the C++ way I suppose. Makes me glad for Rust, that's for sure!
Here take your rustwin point! I really like the explicit capture of C++'s lambdas more than the implicit one in most other languages (C#, Java, Python...) where you easily ends-up with a closure not referencing the expected variable. See: https://blogs.msdn.microsoft.com/ericlippert/2009/11/12/clos...
Re: Lambda expression comparison between C++11, C++14 and C++17
#9A question people who use C++ regularly, is C++ becoming easier to read and code?