Stop comparing programming languages

  • Python is versatile
  • JavaScript is powerful
  • Ruby is elegant
  • C is essential
  • C++
  • Java is robust
  • umbraroze@lemmy.world
    link
    fedilink
    arrow-up
    7
    ·
    6 months 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@lemdro.id
    link
    fedilink
    English
    arrow-up
    4
    ·
    edit-2
    7 months 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 termToDescribeJava because is null at ThrowNullExcep.main(ThrowNullExcep.java:7)
    Exec.main(ThrowNullExcep.java:7) 
    
    • CSS j ust # sucks
    • <HTML />
    • Kotlin is type inference failed. The value of the type parameter K should be mentioned in input types
    • Go is unused variable
    • Rust is Compiling term v0.1.0 (/home/james/projects/Term)
    • sus@programming.dev
      link
      fedilink
      arrow-up
      3
      ·
      edit-2
      6 months 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

      • lastweakness@lemmy.world
        link
        fedilink
        arrow-up
        1
        ·
        6 months 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
        arrow-down
        1
        ·
        6 months 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

  • SirDimples@programming.dev
    link
    fedilink
    arrow-up
    2
    ·
    6 months ago

    Stop comparing tools

    • Hammer is heavy
    • Wrench is elegant
    • Saw is versatile
    • Screwdriver
    • Drill is exciting

    such pointless

    • BatmanAoD@programming.dev
      link
      fedilink
      arrow-up
      0
      ·
      7 months ago

      I was a professional C++ developer for several years, and came to the conclusion that any professional C++ developers who don’t acknowledge its flaws have a form of Stockholm Syndrome.

      • eco@lemm.ee
        link
        fedilink
        arrow-up
        1
        ·
        7 months ago

        This is true of every language. If you can’t think of things you don’t like about the language you’re working in (and/or its tooling) you just don’t know the language very well or are in denial.

        • BatmanAoD@programming.dev
          link
          fedilink
          arrow-up
          0
          ·
          7 months ago

          Ehhh, I mean this more strongly. I’ve never met people more in denial about language design problems than C++ adherents. (Though admittedly I haven’t spent much time talking to Lisp fans about language design.)

          • pelya@lemmy.world
            link
            fedilink
            arrow-up
            0
            ·
            7 months ago

            It’s made worse by the fact C++11 made a lot of solutions for the deep problems in the language. As the C++ tradition dictates, the problems themselves are carefully preserved for backward compatibility, the solutions are like a whole different language.

            And Lisp is small - the first Google result provides a Lisp interpreter in 117 lines of Python code.

            • BatmanAoD@programming.dev
              link
              fedilink
              arrow-up
              1
              ·
              edit-2
              6 months ago

              C++11 also introduced new problems, such as the strange interaction between brace-initialization and initializer-lists (though that was partially fixed several years later), and the fairly arcane rules around move semantics with minimal compiler support (for example, it would be great if the standard required compilers to emit an error if a moved-from object were accessed).

              I know Lisp is minimal, I’m just saying that I expect there are Lisp fans who won’t acknowledge (or would excuse) any shortcomings in the language, just as there are C++ fans who do the same for C++.

  • mindbleach@sh.itjust.works
    link
    fedilink
    arrow-up
    1
    ·
    7 months 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
      7 months 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.)

    • sparkle@lemm.ee
      link
      fedilink
      Cymraeg
      arrow-up
      1
      arrow-down
      2
      ·
      7 months ago

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