▲ | fluoridation 5 days ago | ||||||||||||||||||||||||||||||||||
>making errors with lambdas requires disturbingly little friction Not any less than other parts of the language. If you capture by reference you need to mind your lifetimes. If you need something more dynamic then capture by copy and use pointers as needed. It unfortunate the developer who introduced that bug you mentioned didn't keep that in mind, but this is not a problem that lambdas introduced; it's been there all along. The exact same thing would've happened if they had stored a reference to a dynamic object in another dynamic object. If the latter lives longer than the former you get a dangling reference. >In any case, if you want safety and performance, use Rust. Personally, I prefer performance and stability. I've already had to fix broken dependencies multiple times after a new rustc version was released. Wake me up when the language is done evolving on a monthly basis. | |||||||||||||||||||||||||||||||||||
▲ | sunshowers 4 days ago | parent [-] | ||||||||||||||||||||||||||||||||||
So you agree that modern C++ adds new ways to introduce memory unsafety? | |||||||||||||||||||||||||||||||||||
|