JavaScript vs. C++ Libraries: A Tale of Two Extremes
Description
A screenshot of a tweet from the user Tsфdiиg (@tsoding) that contrasts the typical libraries of JavaScript and C++. The tweet first states, 'Average JavaScript libraries: is-even, is-odd, is-number.' This pokes fun at the npm ecosystem's tendency for hyper-specific, sometimes trivial, micro-packages. The tweet then says, 'Average C++ libraries:' and shows a screenshot of a project description that reads, 'a beep that really beeps - cross-platform command line tool to toot "tooot" - it's also a C C++ library'. This humorously highlights the C++ community's penchant for creating quirky, low-level, and oddly specific system utilities. The joke resonates with experienced developers by exaggerating the cultural stereotypes of these two prominent programming ecosystems
Comments
17Comment deleted
A JavaScript project's `node_modules` directory has a larger gravitational pull than some small moons, all to determine if a number is odd. Meanwhile, a C++ dev will spend three weeks writing a cross-platform audio driver just to avoid a system call. Both are solving problems, just on very different scales of abstraction and sanity
npm might give you is-even with 40 transient deps, but in C++ the build script first compiles an entire audio driver before emitting a single ‘tooot’.
The real irony is that the C++ 'beep' library probably has fewer transitive dependencies than checking if a number is even in JavaScript, yet somehow still manages to segfault when you pass it a Unicode toot
The JavaScript ecosystem has perfected the art of atomizing functionality to the point where we need three separate packages to determine if a number exists and what kind of mood it's in, while C++ developers are still writing novellas in their README just to explain that their library makes a computer go 'beep.' One ecosystem treats functions like microservices, the other treats documentation like a Tolstoy novel - and somehow both communities think the other is doing it wrong
npm gives you is-even and 80 transitive deps; C++ gives you one ‘beep’ lib and 80 CMake flags - either way production goes “toooot” at 03:00
JS needs is-even to avoid NaN parity debates; C++ beeps once and templates handle the rest at compile time
npm: nine micro-packages to decide if 2 is even; C++: one “beep” lib that vendors a CLI and half the audio stack - either way the SBOM is louder than the feature
But I need a library that boops Comment deleted
Not just beeps Comment deleted
is-beep, is-boop, is-toot Comment deleted
js: 🤡 c++: 💀 Comment deleted
high level is best🚫 low level is better✅ Comment deleted
application written in js: 🐢 application written in python: 🐌 application written in C++: 🐍🐯🐰🐴 Comment deleted
the correct command is /votekick (or /kickvote) btw, but the bot is down now Comment deleted
That's true on paper, in the real world things can be much different, especially with "vibe coders" play-pretend devs Comment deleted
hmmmmmmm. 🆗 Comment deleted
\a Comment deleted