| ▲ | andrepd 2 days ago | ||||||||||||||||
I use this all the time. It's features like these that sell Rust for me honestly; even if you wrapped your whole program in `unsafe` it would still be a massively better language than C++ or C. | |||||||||||||||||
| ▲ | 9029 2 days ago | parent | next [-] | ||||||||||||||||
C++ lambdas can be used to achieve a similar result, not as pretty though https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines... But in general I agree! | |||||||||||||||||
| |||||||||||||||||
| ▲ | hu3 2 days ago | parent | prev [-] | ||||||||||||||||
Many languages use this idiom. Some popular ones even. So while it's good that Rust joined them, it's hardly a differentiator. | |||||||||||||||||
| |||||||||||||||||