Skip to content
DevMeme
6165 of 7590
Languages Post #6760 · source on Telegram

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

17
Anonymous ★ Top Pick 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
  1. Anonymous ★ Top Pick

    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

  2. Anonymous

    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’.

  3. Anonymous

    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

  4. Anonymous

    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

  5. Anonymous

    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

  6. Anonymous

    JS needs is-even to avoid NaN parity debates; C++ beeps once and templates handle the rest at compile time

  7. Anonymous

    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

  8. @TheFloofyFloof 1y

    But I need a library that boops

    1. @TheFloofyFloof 1y

      Not just beeps

  9. @fleebz 1y

    is-beep, is-boop, is-toot

  10. Deleted Account 1y

    js: 🤡 c++: 💀

  11. Deleted Account 1y

    high level is best🚫 low level is better✅

  12. Deleted Account 1y

    application written in js: 🐢 application written in python: 🐌 application written in C++: 🐍🐯🐰🐴

    1. @sylfn 1y

      the correct command is /votekick (or /kickvote) btw, but the bot is down now

    2. dev_meme 1y

      That's true on paper, in the real world things can be much different, especially with "vibe coders" play-pretend devs

      1. Deleted Account 1y

        hmmmmmmm. 🆗

  13. @c_3ax 1y

    \a

Use J and K for navigation