Stop comparing programming languages

  • Python is versatile
  • JavaScript is powerful
  • Ruby is elegant
  • C is essential
  • C++
  • Java is robust
  • chraebsliOP
    link
    fedilink
    1948 months ago
    • PHP is old
    • HTML is NOT A PROGRAMMING LANGUAGE!!!
    • CSS is
      ︎ ︎ ︎ not alig-

    ︎ ︎ ︎ ned

    • dohpaz42
      link
      English
      478 months ago

      PHP is old

      Same age as Ruby, Java and JavaScript, but younger than Python, C, and C++. 😛

      • @Guydht
        link
        328 months ago

        I’m guessing they meant “old” as in “no one uses it anymore, it’s dead”

        • dohpaz42
          link
          English
          308 months ago

          Don’t tell my bosses that. Or the PHP community as a whole for that matter. Then I might have to get a real job.

          • @ripcord
            link
            328 months ago

            I’m sorry. If you exclude the millions of sites using it, it is virtually unused.

        • @ChickenLadyLovesLife
          link
          English
          28 months ago

          The year they both came out (1995) I was coding in Visual Basic 3. Ack.

    • DacoTaco
      link
      48 months ago

      Modern php is not bad actually. Still kinda slow and dangerous, but A LOT better than it used to be :')
      That said, i wouldnt build a web service with php still lol

    • chraebsliOP
      link
      fedilink
      28 months ago

      Actual definitions (my opinion):

      • HTML is website
      • CSS is style
      • JS is everywhere
      • SQL is data
      • Python is simple
      • PHP is backend
      • Markdown is README
      • YAML is config
  • Xylight
    link
    fedilink
    English
    93
    edit-2
    8 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)
    • @[email protected]
      link
      fedilink
      23
      edit-2
      8 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

      • @LANIK2000
        link
        68 months 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”.

    • xigoi
      link
      fedilink
      English
      128 months ago

      Rust is downloading 1546 dependencies

      • lastweakness
        link
        48 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
        link
        38 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

        • lastweakness
          link
          88 months ago

          If you’re not using a venv for python development, that’s kind of on you

        • xigoi
          link
          fedilink
          English
          -18 months ago

          Good for you. Not all of us have terabytes of free space on our computers.

  • @[email protected]
    link
    fedilink
    808 months ago

    Mfw Rustaceans don’t exist :(

    Also, JavaScript…why are you the way you are? Does anyone have advice for learning it so it makes sense? I can’t even get tutorial projects to run properly…

    • @davidgro
      link
      538 months ago

      This meme is older than rust.

        • @[email protected]
          link
          fedilink
          English
          128 months ago

          Last company I worked at used Typescript, but used any for everything… I have no idea why. I never got an actual answer.

          • @[email protected]
            link
            fedilink
            English
            158 months ago

            Because they didn’t want to train their JS developers and didn’t want to cause friction for new projects. They get to say they’re using TS, with basically none of the real advantages. (Apart from general rational error checking.)

    • magic_lobster_party
      link
      fedilink
      178 months ago

      I like Douglas Crockford’s talks about the “good parts” of JavaScript. They’re old and probably a bit outdated, but he explain quite well the history and why JavaScript is the way like it is.

      It clicked for me when I saw them the first time. Still hate JavaScript though.

      • wreel
        link
        fedilink
        English
        108 months ago

        What Crockford did was enable a lot of devs to realize there was a viable development platform built into the most prolific and open network client in the world. For that he should be commended but it should have never been taken as “this is a viable general purpose language”.

        • magic_lobster_party
          link
          fedilink
          28 months ago

          He also showed that JavaScript has more resemblance to functional programming languages rather than object oriented ones. If you try to treat it as an object oriented language like Java (like the seem to imply), you will have a bad time.

          This has changed with TypeScript though.

    • @[email protected]
      link
      fedilink
      178 months ago

      The mantra that got me through JavaScript was “almost nothing we do here is able to be synchronous”.

      Everything about the language makes more sense, with that context.

    • @repungnant_canary
      link
      48 months ago

      Can it even make sense tho? To me JS is an example of a not too good thing that people started too eagerly so now they’re trying to make it make sense.

    • @marcos
      link
      38 months ago

      Start simple.

      And that probably requires not going with a tutorial. Because the JS ecosystem scorns at “simple”. Just make some HTML scaffold and use MDN to understand the DOM.

    • @[email protected]
      link
      fedilink
      988 months ago

      “There are only two kinds of languages: the ones people complain about and the ones nobody uses.”

    • DacoTaco
      link
      38 months ago

      Writing raw byte binaries ftw!

      (Jokes aside, all programming languages have their good and bad things. Some just have more bad than good. And i say that as a C/C#/typescript/asm developer :p

    • @[email protected]
      link
      fedilink
      Cymraeg
      38 months ago

      Not Scala and Rust. They are my beloved, my sweethearts, my knights in shining armor.

      Ok Rust does have some major issues, but not Scala…

      • @[email protected]
        link
        fedilink
        78 months ago

        Oof, slow compile times to target, of all things, the JVM? Implicit methods? Some(null)? Function call syntax where the difference between a tuple argument and a sequence of non-tuple arguments can be determined by whether or not there’s a space before the parentheses?

        There are definitely some major issues with Scala.

        • magic_lobster_party
          link
          fedilink
          2
          edit-2
          8 months ago

          They also thought the best thing to take from Python is that version 3 should not be backwards compatible with version 2

          • @[email protected]
            link
            fedilink
            Cymraeg
            38 months ago

            I think that’s good when the objective is to improve the language. One key thing that holds many languages back is that they’re stuck with historical baggage, and it can be pretty difficult to replace/remove “outdated” stuff without breaking everything.

            I do not want to be stuck using Python 2, or Scala 2 (although there exist people who use Scala 2 instead of Scala 3).

            • magic_lobster_party
              link
              fedilink
              18 months ago

              Where I’m working we’re heavily using Spark, which kind of blocks us from upgrading. There seem to be ways to get Scala 3 to work, but we also have old terribly written baggage code no one understands. Just upgrading between 2.12 to 2.13 was a journey.

        • @[email protected]
          link
          fedilink
          Cymraeg
          2
          edit-2
          8 months ago

          I agree that the slow compile times are pretty bad (maybe even deal-breakingly for large projects). I think it’s kind of necessary for a language with as powerful of a syntax as Scala though, it’s pretty absurd how expressive you can get. Maybe if it didn’t target the JVM, it’d be able to achieve way faster compile times – I don’t really see a point of even targeting JVM other than for library access (not to say that that isn’t a huge benefit), especially when it has relatively poor compatibility with other JVM languages and it’s nearly impossible to use for Android (don’t try this at home).

          Even more so, I think that null handling isn’t nice – I wish it were more similar to Kotlin’s. One thing I’m really confused as to why Scala didn’t go all-in on is Either/Result like in Rust. Types like that exist, but Scala seems to mostly just encourages you to use exceptions for error propogation/handling rather than returning a Monad.

          A more minor grudge I have is just the high-level primitive types in general – it’s pretty annoying not being able to specify unsigned integers or certain byte-width types by default, but if it really is an issue than it can be worked around. Also things like mutable pointers/references – I don’t actually know if you can do those in Scala… I’ve had many situations where it’d be useful to have such a thing. But that’s mostly because I was probably using Scala for things it’s not as cut out to do.

          With the tuple arguments point, I get it but I haven’t found it much of an issue. I do wish it wasn’t that way and it consistently distinguished between a tuple and an argument list though, either that or make functions take arguments without tuples like in other functional languages or CLI languages (but that’d probably screw a lot of stuff up and make compile times even LONGER). I saw someone on r/ProgrammingLanguages a while back express how their language used commas/delimiters without any brackets to express an argument list.

          I think an actually “perfect” language to me would basically just be Rust but with a bunch of the features that Scala adds – of course the significant functional aspect that Scala has (and the clearly superior lambda syntax), but also the significantly more powerful traits and OOP/OOP-like polymorphism. Scala is the only language that I can say I don’t feel anxious liberally using inheritance in, in fact I use inheritance in it constantly and I enjoy it. Scala’s “enum”/variant inheritance pattern is like Rust enums, but on crack. Obviously, Rust would never get inheritance, but I’ve found myself in multiple situations where I’m thinking “damn, it’s annoying that I have to treat <X trait> and <Y trait> as almost completely serparate”. It would especially be nice in certain situations with const generic traits that are basically variants of each other.

          Plus, I’ve always personally liked function overloading and default arguments and variadics/variadic generics and stuff, but the Rust community generally seems to be against the former 2. I just really hate there being a hundred functions, all a sea of underscores and adjectives, that are basically the same thing but take different numbers of arguments or slightly different arguments.

          The custom operators are a double-edged sword, I love them and always use them, but at the same time it can be unclear as to what they do without digging into documentation. I guess Haskell has a similar problem though, but I don’t think Scala allows you to specify operator precedence like Haskell does and it just relies on the first character’s precedence. I would still want them though.

          How it goes now, though, is I use Scala 3 for project design/prototyping, scripting, and less performance-sensitive projects, and Rust for pretty much everything else (and anything involving graphics or web). Scala has good linear algebra tooling, but honestly I’ll usually use C++ or Python for that most of the time because they have better tooling (and possibly better performance). I would say R too, but matplotlib has completely replaced it for literally everything regarding math for me.

          • @[email protected]
            link
            fedilink
            18 months ago

            Sounds like we’re actually in agreement about most of this.

            I’m okay with languages limiting their “expressive” power in order to provide stronger correctness guarantees or just limit how “weird” code looks; but this is largely because I’ve worked on many projects where someone had written a heap of difficult-to-understand code, and I doubt such limitations would be appealing if I were working strictly on my own.

            I also don’t really see the appeal of Java-style inheritance, but to be honest I didn’t use Scala for long enough to know whether or not I agree that Scala does inheritance “right”.

            It does make sense that Rust provides mutability in some cases where Scala doesn’t. Rust’s superpower, enabled by the borrow checker, is effectively “safe mutability.” I hope other, simpler languages build on this invention.

      • Ace! _SL/S
        link
        fedilink
        508 months ago

        By running everthing in a single thread obviously. Won’t get more powerful than that

      • polonius-rex
        link
        fedilink
        138 months ago

        good luck doing frontend development without it, but it can also do backend development

        it can do everything

        • @RoyaltyInTraining
          link
          308 months ago

          The thing it can do best is bewilder developers with it’s strange choices

          • polonius-rex
            link
            fedilink
            108 months ago

            i wouldn’t want to program in pure assembly either but asm is definitely powerful

            • wreel
              link
              fedilink
              English
              68 months ago

              I would argue that ASM isn’t “powerful”. It’s direct. You can access advanced features of a CPUs architecture with the trade off limited portability. Sometimes it’s necessary but power comes from being able to express complex control and data structures in a concise and readable amount of text.

              The subjective topic of what “concise and readable” means is where the language wars come in.

        • @[email protected]
          link
          fedilink
          12
          edit-2
          8 months ago

          That makes it versatile, not powerful.

          When I hear powerful language, I think of languages that are good at intensive tasks like assembly, c, rust, Python (because of numpy, pandas, pyspark, cuda, etc.).

          • @[email protected]
            link
            fedilink
            128 months ago

            Python is powerful because it easily wraps C libraries that do real work! Just kidding mostly.

            But yeah, js isn’t a language I would describe as powerful. Ubiquitous? More capable than you would expect given it’s history? Bloated?

            • @[email protected]
              link
              fedilink
              5
              edit-2
              8 months ago

              Python is powerful because it easily wraps C libraries that do real work! Just kidding mostly.

              Not kidding. There’s no rule against that though. It’s good at it’s niche.

              • @9point6
                link
                18 months ago

                Does that not put JS (node) back on the table?

                I’d say it’s the low level language doing the heavy lifting, python or JS in this scenario are just front-ends.

                Hell, I think FORTH has C bindings, that’s not power, that’s mental illness

                • @[email protected]
                  link
                  fedilink
                  68 months ago

                  Sure, but there are good and bad frontends. JavaScript has a tendency to silently fly off the handle in mysterious ways due to the crazy type system. Python will typically fail more predictably, and is famously easy to write. I know nothing about FORTH, honestly.

          • @ripcord
            link
            38 months ago

            Did they get a good workout?

        • @[email protected]
          link
          fedilink
          18 months ago

          if its acceptable to force javascript onto the backend and everywhere else, then why not write the frontend in rust, or anything else than can compile to wasm ?

          • @[email protected]
            link
            fedilink
            58 months ago

            WASM has no native ability to access most web APIs, including the DOM. JavaScript is literally unavoidable on the front end.

            • @[email protected]
              link
              fedilink
              1
              edit-2
              8 months ago

              javascript cannot be compiled natively for the backend or desktop either…

              also libraries like wasm bindgen allow a developer to write almost no javascript. and i wouldnt could a few lines of bootstrapping.

              im dont advocate for wasm when its not necessary. nor do i advocate for backend js when its not necessary.

              • @[email protected]
                link
                fedilink
                38 months ago

                Sorry, I’m not sure what your point is. I realize that you can almost completely avoid JavaScript, but the point I’m making is merely that there is a real technical limitation that limits the choices developers can make for front-end code, and although WASM is making great strides in breaking down that barrier (something I’ve been thrilled to see happen, but which is going much more slowly than I had hoped), the limitation is still there. Conversely, such a barrier has never existed on the backend, except in the sense that C limits what all other languages can do.

                • @[email protected]
                  link
                  fedilink
                  18 months ago

                  my point is that languages have their places.

                  javascript is great for the frontend. not just because it’s the only choice, but it’s also a lot easier to write code for ui than say, C or rust.

                  however i do not see a reason why it needs to run on servers or desktop apps, bar a few cases. i know node is popular, but i think fullstack devs just like to have everything in the same language, even if it makes it harder to use and slower to run.

                  likewise C, rust, go, whatever, are great for backends, embedded etc, but they shouldnt be ran on in the browser, unless there is a specific reason like heavy computation with little dom interaction.

                  just because a barrier does not exist doesnt mean that we should write programs in a language not designed for the domain.

      • @9point6
        link
        108 months ago

        IIRC JavaScript + TypeScript is the biggest demographic of engineers in the industry if you go by GitHub stats

        I suppose you could call that power in a way

    • @marcos
      link
      18 months ago

      Pretty much so.

  • pelya
    link
    478 months ago

    C++ is OVERWHELMINGLY SUPERIOR, if you ask any professional C++ developer.

    • @[email protected]
      link
      fedilink
      278 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.

      • @[email protected]
        link
        fedilink
        148 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.

        • @[email protected]
          link
          fedilink
          58 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
            link
            58 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.

            • @[email protected]
              link
              fedilink
              3
              edit-2
              8 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++.

  • TooManyFoods
    link
    328 months ago

    There was an adjective for C++. It’s just the pointer was dropped.

  • @umbraroze
    link
    308 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.”

  • @psycho_driver
    link
    238 months ago

    C is powerful. Javascript is a husky midwestern gal at a Chinese buffet.

  • @DarkCloud
    link
    18
    edit-2
    8 months ago

    C++ is focused on getting a strong degree of root control over the hardware of lots of systems. Which is part of why it’s difficult.

    • xigoi
      link
      fedilink
      English
      38 months ago

      Only a part. A lot of the complexity is completely unnecessary.

    • @marcos
      link
      38 months ago

      Sorry, Undefined Behavior Everywhere was yelling way too loud to hear you clearly.

      Were you talking about strong controlling anything with C++?

    • @[email protected]
      link
      fedilink
      18 months ago

      I mean, if you’re talking about CVEs permitting attackers to get control of the hardware of lots of systems, then yes, I agree

  • Kushan
    link
    English
    178 months ago

    C# is also here

      • @[email protected]
        link
        fedilink
        1
        edit-2
        8 months 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.

    • @go_go_gadget
      link
      68 months ago

      Shhh don’t tell people they’ll ruin it.

  • Yuri addict
    link
    fedilink
    English
    178 months ago

    what about Holy C? is it only usable to people that are actually god choosen programmers?