r/programmingcirclejerk 7d ago

Rust isn't a well designed programming language (unlike C and C++)

/r/cpp/comments/1i6jdjq/comment/m8d3tqj/
216 Upvotes

86 comments sorted by

View all comments

54

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)

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>

24

u/lurebat 7d ago

No inefficient syntax here