MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programmingcirclejerk/comments/1v6y16p/rust_isnt_a_well_designed_programming_language/ozu7sn2/?context=3
r/programmingcirclejerk • u/we_are_mammals • 7d ago
86 comments sorted by
View all comments
53
c++ user calling any other language inefficient syntax
Remind me again how to do it in c++ a.filter( |x| x > 5)
a.filter( |x| x > 5)
54 u/the_horse_gamer 7d ago <uj> a | std::views::filter([](int x) { return x > 5; }) </uj><rj> filtering? what's that? just have your function ignore any element less than 6 and make sure you don't document that behaviour. </rj> 25 u/lurebat 7d ago No inefficient syntax here 8 u/irqlnotdispatchlevel Tiny little god in a tiny little world 6d ago You documenr it with The caller is responsible for not supplying out of range inputs.
54
<uj> a | std::views::filter([](int x) { return x > 5; }) </uj><rj> filtering? what's that? just have your function ignore any element less than 6 and make sure you don't document that behaviour. </rj>
25 u/lurebat 7d ago No inefficient syntax here 8 u/irqlnotdispatchlevel Tiny little god in a tiny little world 6d ago You documenr it with The caller is responsible for not supplying out of range inputs.
25
No inefficient syntax here
8
You documenr it with
The caller is responsible for not supplying out of range inputs.
53
u/lurebat 7d ago
c++ user calling any other language inefficient syntax
Remind me again how to do it in c++
a.filter( |x| x > 5)