No offence

      • Unicorn 🌳
        link
        fedilink
        302 years ago

        C is old, ubiquitous and still does not have a good replacement for its low-level cross-platform usecases, so I’ll believe it when I see it 😄

          • @abessman@lemmy.world
            link
            fedilink
            62 years ago

            I mean yeah, if you restrict yourself to the C part of C++ it can do everything C can. But then you’re not getting any of the advantages of C++.

            Once you start using things like classes and templates heavily, your program will quickly outgrow low-end hardware.

            • @pedro@lemm.ee
              link
              fedilink
              12 years ago

              “Outgrow low-end hardware”?

              What does a programming language have to do with this?

              • @abessman@lemmy.world
                link
                fedilink
                72 years ago

                Everything.

                Every programming language is an abstraction layer between the programmer and the machine that will run the code. But abstraction isn’t free. Generally speaking, the higher the abstraction, the less efficient the program.

                C++ optionally provides a much higher level of abstraction than pure C, which makes C++ much nicer to work with. But the trade off is that the program will struggle to run in resource constrained environments, where a program written in C would run just fine.

                And to be clear, when I say “low-end hardware”, I’m not talking about the atom-based netbook from 2008 you picked up for $15 at a yard sale. It will run C++ based programs just fine. I’m talking about 8- or 16-bit microcontrollers running at <100 MHz with a couple of hundred kB of RAM. Such machines are still common in many embedded applications, and they do not handle C++ applications gracefully.

            • And speed too. A small program using only C features can compile 5x faster with a c compiler then a c++ one. (GCC will use c++ mode on a .cop file so make sure it is .c)

          • Unicorn 🌳
            link
            fedilink
            22 years ago

            I wouldn’t say “need”, but there are possible improvements to ergonomics and safety that wouldn’t make the language itself more complex or high level. I think it does its job quite well though and will be here for decades to come.

          • @Ret2libsanity@infosec.pub
            link
            fedilink
            12 years ago

            Rust won’t replace c.

            The programs are too bloated for many embedded systems where every byte counts because it’s in ROM or loaded jnto IRAM

            All that memory safety and garbage collection, for example, comes at a big cost

          • Unicorn 🌳
            link
            fedilink
            52 years ago

            Its cross-platform support (not just for using but also for building it) is not there yet, and it is quite huge and unstandardized with only one full implementation. I’d agree the last part will change with age, but given the frequent large changes and feature additions I am afraid it will be harder and harder and it is simply too complex and fast-moving for many low-level applications. It is closer to C++ than C in my eyes. I’d be happy seeing it replace C++ though for its memory safety benefits!

          • Justin
            link
            fedilink
            22 years ago

            At the same time, C is the only stable ABI available for Rust.

            • @pingveno@lemmy.ml
              link
              fedilink
              English
              22 years ago

              That’s true, but they’re working on an ABI implementation. It’s no mean feat with a language like Rust. A quick search around the Internet found various possible candidates, though many of the discussion threads have petered out.

        • @Rodeo@lemmy.ca
          link
          fedilink
          -12 years ago

          Ada has been around since 1983 and is objectively superior. Yes I will die on that hill.

          It’s too bad programmers are all such egotards they think they can write bugfree programs in C, while whining about how “restrictive” a safe language like Ada is.

  • Rikudou_Sage
    link
    fedilink
    212 years ago

    Yeah, gonna have to disagree. If I had to choose between JS and Python, I’d shoot myself in the head.

    • @Valmond@lemmy.ml
      link
      fedilink
      92 years ago

      Python is cool IMO, got loads of libraries and gets your little app up in notime.

      Not for larger projects though.

      JavaScript is like the unsafest language I have touched in the last 20 years, yikes!

      Still would use it as a web front end instead of python ofc.

        • @jflorez@sh.itjust.works
          link
          fedilink
          62 years ago

          Before 3.9 the lack of type hints made it a nightmare for large projects. Strong typing is, among other benefits, a way of self documentation and helps IDEs with auto-complete. If I use Python I always use type hints and if I have to use JS sigo with Typescript instead

          • @pazukaza@lemmy.ml
            link
            fedilink
            22 years ago

            Python without type hints is torture. I always need to have the fucking docs opened for anything, and if the docs are bad you’re screwed, get ready to read the source code. Like fucking hell man, just let me autocomplete this shit…

        • @Valmond@lemmy.ml
          link
          fedilink
          12 years ago

          Well you can do it the ‘old’ way serving front (pages) from the back like PHP did it.

          • @pazukaza@lemmy.ml
            link
            fedilink
            12 years ago

            Ah ok, server side rendering with no JS. I mean, server-side rendering is good. But a front with no JS? Idk, the page would feel pretty outdated. I wonder if there modern front-ends with zero js.

    • @Redrum714@lemm.ee
      link
      fedilink
      12 years ago

      Glad C++ will be the one step on it cause it deserves it. I’d take PHP over that shit any day

    • @Rodeo@lemmy.ca
      link
      fedilink
      02 years ago

      Afaik JavaScript only runs in a browser. If you want to make a desktop app your only option is something like electron.

      For example, you can’t make the equivalent of a bash script with JS, but it’s trivial with python. I don’t think you can do system calls at all with JS.

      • @LeFantome@programming.dev
        link
        fedilink
        82 years ago

        Well done.

        That is like a colleague farewell card that says, “Four years already? It seems like only six months with all that we have accomplished.”

        • @superbirra@lemmy.world
          link
          fedilink
          62 years ago
          • loosely typed: python is the same

          false

          • bad package manager: python is infinitely worse

          don’t think so but ehy…

          • Xylight (Photon dev)
            link
            fedilink
            52 years ago

            pip is the bane of my existence

            Also python IS loosely typed. take a str and you can reassign it to an int or whatever

            • Yep last time I tried python, it’s type checker was so, so much worse than typescript.

              Everyone I’ve met saying python is better turned out not have used modern JavaScript/typescript.

              • @Joe_0237@lemmy.ml
                link
                fedilink
                82 years ago

                I’m sure that’s the case, but the meme is not making fun of typescript, its making fun of his dad: JavaScript, maybe for not comparing to his son: typescript

            • @static_motion@programming.dev
              link
              fedilink
              13
              edit-2
              2 years ago

              You clearly have no idea what you’re talking about. Python is strongly typed. What is is is dynamically typed, also known as “duck typing”.

            • Jerkface (any/all)
              link
              fedilink
              2
              edit-2
              2 years ago

              Objects have strong, definite types that never change. Variables do not have types and can store [a reference to] any Object.

          • @abraxas@lemmy.ml
            link
            fedilink
            English
            42 years ago

            You’re right about python being the same. Python doesn’t have a mature alternative to Typescript that launches it into having best-in-class type handling.

            There’s so much that my C# devs can’t do with its horrible type system that Typescript “just does better”. At compile-time at least.

            I used to work on a hybrid typescript/python product (some services js, some TS, some python), and the TS stuff was just faster-running, easier to iterate, and better. And story-point allocations consistently showed that for an excess of 20 devs working on those codebases.

            As for pip/easy_install vs npm/yarn/pnpm… I’m curious what you think pip does well that yarn/npm doesn’t? I’ll say in my work experience there’s more/better enterprise private repository/cache support for node modules than for python modules. Using npm security databases alongside “known good versioning” allows a team of even 100 developers to safely add libraries to projects with no fear of falling out of corporate compliance regulations. I’ve never seen that implemented with pip

            • @Bruce@lemmy.ml
              link
              fedilink
              English
              32 years ago

              100 developers to safely add libraries to projects with no fear of falling out of corporate compliance regulations.

              Depending on the regulations, python virtual envs could make it possible too.

              • @abraxas@lemmy.ml
                link
                fedilink
                English
                12 years ago

                How so? The companies I worked for were using venv’s but nothing that could help with standards.

                Using a private npm repo, I can actually do aninstall of a library I want to use and it’ll refuse to install if that library isn’t already approved for use by the organization, and if it is/does, it will install only the approved version. Further, I still don’t have any of the libraries installed I don’t want (even secure-seeming unnecessary code is a potential risk and unnecessary). The last 2 places I worked that used python used venv’s, but the pip requirements.txt file was still fairly hard to keep regulated.

            • @pingveno@lemmy.ml
              link
              fedilink
              English
              22 years ago

              pip/easy_install

              Are you sure your knowledge of Python’s package management isn’t out of date? easy_install has been deprecated for years. There are a few mechanisms that the Python community now has for dependency management and installation. My favorite solution is Poetry, which like npm maintains a separate dependency (pyproject.toml) and lock (poetry.lock) file.

              • @abraxas@lemmy.ml
                link
                fedilink
                English
                12 years ago

                I didn’t think anyone was using easy_install anymore, but I still see it in docs for stuff.

                Poetry looks interesting, but does it support private-only dependencies, where the system will reject a library or version if it has not been previously approved and cached?

    • @maltroth@lemmy.ca
      link
      fedilink
      42 years ago

      It’s an easily accessible language, I started to learn with JavaScript as well. Easy to teach the basics.

  • @quadrotiles@reddthat.com
    link
    fedilink
    232 years ago

    Ok, admittedly I was using typescript but honestly, I really enjoyed using JavaScript. I kinda feel like people who shit on it have never used it much, or aren’t very experienced, or it just wasn’t to their taste and they’re jumping on the hate train that the others like to conduct.

    (I also understand this is a joke dw)

    • Primal
      link
      fedilink
      62 years ago

      My feelings toward JavaScript depend on the context in which I’m using it. I really like JavaScript in a React app or Next.js, but I don’t care for it in Views and Razor page in .NET web applications, though it’s getting better.

    • @rob64@startrek.website
      link
      fedilink
      7
      edit-2
      2 years ago

      It’s probably also related to when a person first encountered JS. If you learned it pre-2015—even if you’re aware of the changes made in ES6—I can see how it would be hard not to view JS as cumbersome. I personally love to use it, but I can’t imagine that would be true without let, const, classes, etc.

      Edit also block scoping and arrow functions!

    • @gamer@lemm.ee
      link
      fedilink
      82 years ago

      I kinda feel like people who shit on it have never used it much, or aren’t very experienced

      How much experience do you have? (and don’t even think about lying; this is the internet)

      • @quadrotiles@reddthat.com
        link
        fedilink
        192 years ago

        Definitely 2023 years worth of experience. I taught Jesus himself JS. Which, fun fact, doesn’t stand for JavaScript, but stands for JesusScript. I would never lie on the internet.

        (4ish years lmao)

        • @gamer@lemm.ee
          link
          fedilink
          02 years ago

          4 years isn’t enough to hate javascript. Either those 4 years are entirely in JS, in which case it’s all you know and thus you lack perspective. OR, you spent e.g. 2 years with a different language and only 2 in JS, in which case you don’t have enough experience with JS to have an informed opinion.

          Don’t worry though, we all started our JS hating journey like that. Give it a few more years and I promise you’ll be able to hate javascript like the masters.

          • @maltroth@lemmy.ca
            link
            fedilink
            22 years ago

            10ish years here, I don’t hate js. The more modern tools, frameworks and typescript makes it awesome to use for frontend stuff.

          • @quadrotiles@reddthat.com
            link
            fedilink
            22 years ago

            I never said I had a total of 4 years experience, only that I had 4 years of JS experience.

            But yes, I will work on honing my hatred. I hope to one day gain a seat at the JSith council and achieve the rank of master.

    • Kit Sorens
      link
      fedilink
      72 years ago

      peaks through the cheap stand-up office blinders from the C# “office” Can you help me debug something rq?