memesearch
Rust Is More Readable

Rust Is More Readable

Download Find similar pictures
Text on the meme
funnily enough, rust is the most readable one they simply can't compete int calculate(int bottom, int top) { if (top > bottom) { auto even = [](auto e) { return e % 2 == 0; }; return ranges::accumulate( std::views::iota(bottom, top + 1) | std::views::filter(even), 0); } else { return 0; } } fn calculate(bottom: i32, top: i32) -> i32 { (bottom..=top) .filter(|e| e % 2 == 0) .sum() } int calculate(int bot, int top) { if (bot > top) return 0; bot = (bot + 1) & ~1; top = top & ~1; if (bot > top) return 0; return (((top - bot) >> 1) + 1) * (bot + top) / 2; }
What it means

A social media post compares three implementations of the same calculation: modern C++, Rust, and optimized C. The joke is that Rust is presented as the most readable and concise, while the C++ and especially the low-level C versions look increasingly complicated. It is a reaction meme for programming-language debates and playful superiority between developer communities.

Objects
Tags
Source
Type
image
Size
666×800 · 77.7 KiB
Mood
sarcastic, playful
Language
en
Added