Stop comparing programming languages

  • Python is versatile
  • JavaScript is powerful
  • Ruby is elegant
  • C is essential
  • C++
  • Java is robust
  • reillypascal@lemmy.world
    link
    fedilink
    English
    arrow-up
    0
    ·
    16 days ago

    The only reason I use C++ is because that’s what all the main audio plugin tools use. It’s warty and annoying, although I’m confused why Java would rank higher

    • ChickenLadyLovesLife@lemmy.world
      link
      fedilink
      English
      arrow-up
      0
      ·
      16 days ago

      My main experience using C++ was because I got stuck modifying an app written with Qt Creator, an utterly insane cross-platform framework that used (still uses? I dunno, only people in Finland ever used it in the first place) C++ for the under-the-hood processing and Javascript for the UI. For good measure, the application developers had modified all the C++ stuff with macros to the point where it was barely even recognizable as C++. Fortunately, it mattered not at all because the app’s customers were ISPs who just wanted a Skype clone so they could say they had one even though none of their customers ever used the damn thing.

      • John Richard@lemmy.world
        link
        fedilink
        arrow-up
        0
        ·
        16 days ago

        I shit on JavaScript for years… but Deno (built around Rust) is honestly one of the most pleasant tools I’ve used for development, and you get all the completion in VS Code.

  • umbraroze@lemmy.world
    link
    fedilink
    arrow-up
    0
    ·
    15 days ago

    JavaScript is powerful

    Old joke (yes, you can tell):

    “JavaScript: You shoot yourself in the foot. If using Netscape, your arm falls off. If using Internet Explorer, your head explodes.”

  • Xylight (Photon Dev)@lemdro.id
    link
    fedilink
    English
    arrow-up
    0
    ·
    edit-2
    16 days ago
    • Python is NameError: name 'term\_to\_describe\_python' is not defined

    • JavaScript is [object Object]

    • Ruby is TypeError: Int can't be coerced into String

    • C is segmentation fault

    • C++

    • Java is

    Exception in thread "main" java.lang.NullPointerException: Cannot read the term_to_describe_java because is null at ThrowNullExcep.main(ThrowNullExcep.java:7)
    Exec.main(ThrowNullExcep.java:7) 
    
      • lastweakness@lemmy.world
        link
        fedilink
        arrow-up
        0
        ·
        15 days ago

        Crates aren’t exactly runtime dependencies, so i think that’s fine as long as the 1500+ dependencies actually help prevent reinventing the wheel 1500+ times

      • LordKitsuna@lemmy.world
        link
        fedilink
        arrow-up
        0
        ·
        15 days ago

        I’ll happily download 63928 depends so long as it continues to work. And it does, unlike python projects that also download 2352 depends but in the process brick every other python program on your system

    • sus@programming.dev
      link
      fedilink
      arrow-up
      0
      ·
      edit-2
      15 days ago

      C++ is std::__cxx11::list<std::__shared_ptr<table, (__gnu_cxx::_Lock_policy)0>, std::allocator<std::__shared_ptr<table, (__gnu_cxx::_Lock_policy)0> > >::erase(std::_List_const_iterator<std::__shared_ptr<table, (__gnu_cxx::_Lock_policy)0> >) /usr/include/c++/12/bits/list.tcc:158

      • LANIK2000@lemmy.world
        link
        fedilink
        arrow-up
        0
        ·
        15 days ago

        I once forgot to put curly braces around the thing I was adding into a hashmap. If I remember correctly it was like ~300 lines of error code, non of which said “Wrong shit inside the function call ma dude”.

    • sparkle@lemm.ee
      link
      fedilink
      Cymraeg
      arrow-up
      0
      ·
      16 days ago

      C++ is inferior to Rust and should be used in no new projects unless it is absolutely necessary

      • douglasg14b@programming.dev
        cake
        link
        fedilink
        arrow-up
        0
        ·
        edit-2
        16 days ago

        The ecosystem is really it, C# as a language isn’t the best, objectively Typescript is a much more developer friendly and globally type safe (at design time) language. It’s far more versatile than C# in that regard, to the point where there is almost no comparison.

        But holy hell the .Net ecosystem is light-years ahead, it’s so incredibly consistent across major versions, is extremely high quality, has consistent and well considered design advancements, and is absolutely bloody fast. Tie that in with first party frameworks that cover most of all major needs, and it all works together so smoothly, at least for web dev.

  • witx@lemmy.sdf.org
    link
    fedilink
    arrow-up
    0
    ·
    16 days ago

    I was caught by surprise and for some reason this joke clicked so much that I laughed for a while. Kudos

  • mindbleach@sh.itjust.works
    link
    fedilink
    arrow-up
    0
    ·
    16 days ago

    C++ is all of those, provided you pick any 10% of it.

    You’re not supposed to cast every spell in the evil grimoire.

    • BatmanAoD@programming.dev
      link
      fedilink
      arrow-up
      0
      ·
      edit-2
      16 days ago

      Well, except “robust”, unless you have very strict code standards, review processes, and static analysis.

      (And arguably it’s never elegant, though that’s almost purely a matter of taste.)

        • BatmanAoD@programming.dev
          link
          fedilink
          arrow-up
          0
          ·
          16 days ago

          I see where you’re coming from, but no matter how many null pointer exceptions there are in Java code, you’re almost always protected from actually wrecking your system in an unrecoverable way; usually the program will just crash, and even provide a relatively helpful error message. The JVM is effectively a safety net, albeit an imperfect one. Whereas in C++, the closest thing you have to a safety net, i.e. something to guarantee that invalid memory usage crashes your program rather than corrupting its own or another process’s memory, is segfaults, which are merely a nicety provided by common hardware, not required by the language or provided by the compiler. Even the, with modern compiler implementations, undefined behavior can cause an effectively unlimited amount of “bad stuff” even on hardware that supports segfaults.

          Additionally, most languages with managed runtimes that existed when Java was introduced didn’t actually have a static type system. In particular, Perl was very popular, and its type system is…uh…well, let’s just say it gives JavaScript some serious competition.

          That said, despite this grain of truth in the statement, I think the perception that Java is comparatively robust is primarily due to Java’s intense marketing (particularly in its early years), which strongly pushed the idea that Java is an “enterprise” language, whatever that means.