• Korhaka@sopuli.xyz
    link
    fedilink
    English
    arrow-up
    4
    ·
    3 hours ago

    Unless you are making a HTML/CSS only site (based) what do you want to use instead?

  • Mose13@lemmy.world
    link
    fedilink
    arrow-up
    2
    ·
    4 hours ago

    Genuinely curious, how many of you hating on JS have done professional frontend work recently? If you have done professional work, was it part/full time, using TypeScript, how big was your eng team, did you have to worry about Server Side Rendering?  Maybe some extra context will show certain types of projects yield devs that hate the language.

  • Feathercrown@lemmy.world
    link
    fedilink
    English
    arrow-up
    7
    arrow-down
    1
    ·
    5 hours ago

    If you care this much about JS being cringe I don’t trust you to contribute good code to a project anyways

    • Mose13@lemmy.world
      link
      fedilink
      arrow-up
      5
      ·
      edit-2
      4 hours ago

      People on here really think the language determines the quality of the project lol

    • jpeps@lemmy.world
      link
      fedilink
      arrow-up
      1
      ·
      2 minutes ago

      I got a little under half in the first two, which I’m very happy with haha. JS certainly has some quirks, but you’ve really got to go looking for them IMO. TypeScript resolves most of these issues with comparing types, and the rest aren’t that unique to JS.

    • Mose13@lemmy.world
      link
      fedilink
      arrow-up
      4
      ·
      edit-2
      4 hours ago

      You’re not wrong, but newer version of the language have steered devs away from these quirks. The quirks remain because the JavaScript language is 100% backwards compatible. It’s fun to laugh at these quirks, but I’ve been a full time JavaScript developer for 4 years and part time since 2015, and I’ve never seen any of these quirks come up in the real world. If you tell your developers to use === instead of == in code review, you eliminate most of the problems imo.

      JavaScript tooling deserves more hate imo. The ecosystem is kinda a disaster, but Vite is making a lot of progress in fixing that. If you ignore React Native and metro bundler, I think the state of web is looking pretty optimistic right now. At least from a technology perspective. From a business/AI/enshitification perspective we’re cooked lol

    • el_abuelo@programming.dev
      link
      fedilink
      arrow-up
      5
      ·
      5 hours ago

      this quirkiness doesn’t materialise in real world applications on any scale that makes it harder to deal with than the alternatives.

  • melfie@lemy.lol
    link
    fedilink
    arrow-up
    51
    arrow-down
    1
    ·
    1 day ago

    I worked in heavy JavaScript codebases back in the IE days and wasn’t too crazy about it. Then JIT compilers like v8 came along and made it run a lot faster and TypeScript also made it more usable for larger codebases. I now consider TypeScript among my favorite languages. I’ve also written a lot of Go lately, and while I appreciate its speed and smaller memory footprint, the missing language features kind of grate on me and I don’t mind taking a bit of a performance hit for the (IMO) superior ergonomics of TypeScript, especially for workloads where I/O is more of the bottleneck than compute.

    • RagingRobot@lemmy.world
      link
      fedilink
      arrow-up
      2
      ·
      22 minutes ago

      It’s funny because I learned to program with strongly types languages and when I moved over to JavaScript I always complained about it for the longest time but now that I use mostly typescript at work I kind of miss some of the old JavaScript patterns and their flexibility. But for working with large teams or large projects in general it’s nice to have typescript

    • sip@programming.dev
      link
      fedilink
      arrow-up
      17
      ·
      1 day ago

      agreed. typescript is excelent, especially if you make it strict and know a bit of complex types to make sure things stay put.

      • Victor@lemmy.world
        link
        fedilink
        arrow-up
        7
        ·
        21 hours ago

        Chiming in as a professional TS dev. It’s really a joy to do web dev work in the post TS world.

        • biggeoff@sh.itjust.works
          link
          fedilink
          arrow-up
          4
          ·
          11 hours ago

          What do you think of JSDoc? As someone who knows neither I find the idea of no required transpilation very appealing, while still getting the TS ecosystem tools.

          • Victor@lemmy.world
            link
            fedilink
            arrow-up
            4
            ·
            11 hours ago

            JSDoc is much more cumbersome than using TypeScript. That’s it. It clutters the code in a way that TypeScript somehow avoids. TS types are smoothly integrated in the code itself, IMO. Not as much the case with JSDoc.

            • biggeoff@sh.itjust.works
              link
              fedilink
              arrow-up
              4
              ·
              7 hours ago

              Thanks! As a hardware guy it’ll be a long time before I do anything with this information. Nice to hear the opinions of actual Devs.

              • Mose13@lemmy.world
                link
                fedilink
                arrow-up
                1
                ·
                4 hours ago

                I suspect most Lemmy users hating on JS haven’t done much professional JS work. Especially these days with TypeScript and all the modern conveniences.

                I’m curious, what kinda hardware do you work on?

              • Victor@lemmy.world
                link
                fedilink
                arrow-up
                1
                ·
                5 hours ago

                Ah alright 🙂 My pleasure! Yeah I wouldn’t even consider JSDoc if I had the choice of TypeScript. I even did some years of Advent Of Code in TypeScript. It’s performant enough and simple to employ some kind of quasi functional programming style with it. I think it’s great.

                • Mose13@lemmy.world
                  link
                  fedilink
                  arrow-up
                  1
                  ·
                  4 hours ago

                  I think Rich Harris famously migrated Svelte from TypeScript to JSDoc, while still supporting TypeScript via JSDoc. I don’t use Svelte, so I have no idea how well this works in practice. However, Rick Harris seems smart to me, unlike other overly opinionated devs like DHH. I still wouldn’t use JSDoc over TS, but I guess if it works for your project, who cares. What matters is that we all remember the one true enemy, DHH

            • biggeoff@sh.itjust.works
              link
              fedilink
              arrow-up
              2
              ·
              7 hours ago

              Being honest, I’m an outsider looking in. Most likely these things are solved problems, but alternates are always interesting to hear insider opinions on.

              Sounds like it’s developer experience Vs required post processing in this case, which is a reasonable tradeoff to think about

        • sip@programming.dev
          link
          fedilink
          arrow-up
          3
          ·
          12 hours ago

          i wish a more performing language would have this type system. the only other ones I know are Rust which is a bit strict and slow to dev on, and Haskell which is too much.

            • sip@programming.dev
              link
              fedilink
              arrow-up
              1
              ·
              edit-2
              12 hours ago

              I asked chatgpt for a few languages with a good typesystem and it suggested ocaml among other (scala, rust, haskell, f#)

              Then asked for a 100 line ocaml REST API example with a popular framework and db lib… and it looks mostly like Haskell.

              edit: async is done with monads

              • Victor@lemmy.world
                link
                fedilink
                arrow-up
                1
                ·
                11 hours ago

                If it looks mostly like Haskell but has better tooling, I’m in. I have yet to manage to successfully set up a Haskell environment on my own PC. 😅 I am obviously missing something.

  • Redkey@programming.dev
    link
    fedilink
    arrow-up
    58
    ·
    1 day ago

    JS has saved me many hours of mind-numbing, error-prone manual keyboard work by giving me a way to hack together a simple bit of automation as a web page.

    Even when a computer has been ham-fistedly locked-down by an overzealous IT department, I can almost always still access a text editor and a browser that will load local HTML files.

    • mirshafie@europe.pub
      link
      fedilink
      arrow-up
      26
      ·
      1 day ago

      Add to that the beauty of bookmarklets.

      It’s silly that IT departments forces us to resort to techniques used before browser extensions became a thing, and it’s ironic that it’s because they don’t know how to code, but here we are.

  • termaxima@slrpnk.net
    link
    fedilink
    arrow-up
    28
    arrow-down
    4
    ·
    1 day ago

    JavaScript really depends on the people writing it restricting themselves to a sane (ish) subset, just like C++

    My personal gripe with JavaScript is how horribly slow it is. C++ at least has the merit of being fast once compiled. I wouldn’t feel great contributing to a JS project knowing fully well that a rewrite in a faster language would be 10x as effective as anything I could improve as is.

    • Mose13@lemmy.world
      link
      fedilink
      arrow-up
      1
      ·
      4 hours ago

      That’s funny because I - having not written much C++ - have an irrational hate of the language. But I like JavaScript. I think I need to look at C++ through the same lens I look at JS through.

      Imo you can write pretty performant websites in JS. I guess it depends what you’re doing, but e.g. if you pay attention to you’re rerenders in React, you’re gonna have a much better time.

      But I also totally understand as soon as you wanna do some compex stuff, JavaScript is not a good time. I don’t think webassembly has worked as smoothly as promised, but in theory, that should let you bring some C++ into the browser.

  • addie@feddit.uk
    link
    fedilink
    arrow-up
    12
    arrow-down
    1
    ·
    1 day ago

    I’m in this photo and I don’t like it.

    More specifically, my programming background is in industrial automation and I’d like to add some more ‘robust and flexible’ algorithms to CoolerControl so I can control my system fans / temperature better, but it’s written in a mix of TypeScript and Rust.

    I’ve spent 20 years programming hard real-time z80 assembly and know quite a few higher-level languages. (Although I prefer the lower-level ones.) Not those ones, however, so it’s not just a couple of hours work to raise a PR against that project. Going to need to crack some books.

  • SethranKada@lemmy.ca
    link
    fedilink
    English
    arrow-up
    59
    arrow-down
    7
    ·
    2 days ago

    Feels the same whenever a project is written in python, but I uninstall it too.

      • insomniac_lemon@lemmy.cafe
        link
        fedilink
        English
        arrow-up
        1
        ·
        edit-2
        3 hours ago

        I’m going to go with the multiple causes for slowness (and that’s interpreted languages in general). In some cases, things might be usable if I weren’t on Zen+ still (newer stuff has better IPC among other things).

        Things like JIT or no-GIL might reduce that, but I’m not sure that it’s that easy to fix (not being default (plus multiple options) seems to complicate bindings even).

      • rhabarba@feddit.org
        link
        fedilink
        arrow-up
        75
        arrow-down
        5
        ·
        2 days ago

        Same, so I’ll only answer for me: Python is dependency hell, also breaking existing code with every second update. Hard pass.

        • lauha@lemmy.world
          link
          fedilink
          arrow-up
          20
          arrow-down
          2
          ·
          1 day ago

          breaking existing code with every second update

          Still remembering python 3 release from 17 years ago?

        • SSUPII@sopuli.xyz
          link
          fedilink
          arrow-up
          18
          arrow-down
          1
          ·
          2 days ago

          We are no longer in the Python 2 days. You have lots of wiggle room for using the version you want and are rarely forced to use specific releases.

          • Jesus_666@lemmy.world
            link
            fedilink
            arrow-up
            29
            ·
            1 day ago

            There still plenty of “this version of pytorch doesn’t run reliably with Python 3.12, please use 3.10”, though. It’s not all sunshine and roses.

            • FishFace@piefed.social
              link
              fedilink
              English
              arrow-up
              3
              arrow-down
              1
              ·
              1 day ago

              If you’re writing python code you have to deal with versioning, yeah. But the end user basically never has to care.

              • Jesus_666@lemmy.world
                link
                fedilink
                English
                arrow-up
                14
                ·
                1 day ago

                Except if they then have to run it on their machine and the setup instructions start with setting up a venv. I find that a lot of Python software in the ML realm makes no effort to isolate the end user from the complexities of the platform. At best you get a setup script that may or may not create a working venv without manual intervention, usually the latter. It might be more of a Torch issue than a Python one but it still means spending a lot of time messing with the Python environment to get things running.

                This may color my perception but the parts of the Python ecosystem I get exposed to as an end user these days feel very hacky. (Not all of it is, though; I remember from my Gentoo days that Portage was rock solid.)

                • Confused_Emus@lemmy.dbzer0.com
                  link
                  fedilink
                  English
                  arrow-up
                  5
                  ·
                  1 day ago

                  Figuring out venvs was a bit frustrating for me. Particularly since the steps I was following to install a particular app mentioned nothing about them, so I just got an error when I tried to follow their instructions. Thankfully managed to get it figured out, but yeah, definitely wouldn’t have been my first choice for an install method if others were available for that app.

                • Valmond@lemmy.world
                  link
                  fedilink
                  arrow-up
                  3
                  ·
                  1 day ago

                  Security issues aside, you can freeze python code to an executable, linux, mac, windows.

                  Kind of neat IMO. Except the security concerns ofc.

                • rhabarba@feddit.org
                  link
                  fedilink
                  arrow-up
                  3
                  ·
                  1 day ago

                  There are reasons why Common Lisp (that I absolutely prefer as well) is still a big thing in AI-related applications. Some of those are listed in your comment.

                • The Quuuuuill@slrpnk.net
                  link
                  fedilink
                  English
                  arrow-up
                  1
                  ·
                  1 day ago

                  if they do that’s not release ready software that you should concern yourself with imo. that’s a problem of project maturity not runtime choice

                • FishFace@piefed.social
                  link
                  fedilink
                  English
                  arrow-up
                  1
                  ·
                  1 day ago

                  ML is a very new field and so most programs are not mature, and indeed they can have you messing around with venvs and such.

                  But most python software people actually used is packaged by a distro already.

      • Ephera@lemmy.ml
        link
        fedilink
        English
        arrow-up
        41
        arrow-down
        1
        ·
        2 days ago

        Personally, I find that (complex) software implemented in Python tends to be so unreliable that I typically don’t want to use it after all, but I only find that out after wasting a bunch of time learning the software.
        It’s just frustrating, especially if I come back to the software every so often, naively thinking that it’s been a few versions, so maybe they’ve fixed it. It’s always just different bugs, which still end up being too frustrating to use the software.


        To give an example, I like to compose music using Lilypond, which is more-or-less a programming language to create sheet music. And there is a program that’s supposed to give you a well-integrated workflow for that (i.e. an IDE), called Frescobaldi.
        The first time I tried it, playback of the composed music wouldn’t work.
        The second time, I couldn’t click on notes to jump to the respective code snippet.
        And I tried it again a few weeks ago and it just crashed immediately with an obscure error message.

        Instead, I’ve slapped together a script, which just opens the sheet music in my PDF viewer, the code in my normal editor and then uses a CLI tools to generate and playback the sheet music. And while it’s definitely not perfect, it has been working more reliably for me than Frescobaldi ever has.