• hperrin@lemmy.ca
    link
    fedilink
    English
    arrow-up
    11
    arrow-down
    10
    ·
    12 hours ago

    Some of the best software is written in JavaScript.

    • Uptime Kuma
    • Immich
    • Supabase
    • VS Code/VSCodium
    • Ionic (what the Voyager Lemmy client is written in)
    • Expo/React Native (which powers probably a third of your apps)
    • MonkderVierte@lemmy.zip
      link
      fedilink
      arrow-up
      2
      ·
      4 hours ago

      Using only VSCodium in this llist. But not much, because i always have to close it on evening, or the casual game with 300 mods wouldn’t run beside it and the webbrowser reserving about half of my 32 GB RAM.

    • Fushuan [he/him]@lemmy.blahaj.zone
      link
      fedilink
      arrow-up
      1
      ·
      5 hours ago

      Technically typescript. I know it transpiles to J’s but half the complaints I read are about the typo conversion and so on, which ts heavily alleviates.

    • arcterus@piefed.blahaj.zone
      link
      fedilink
      English
      arrow-up
      28
      ·
      10 hours ago

      This doesn’t really conflict with the post. They use and appreciate the software, so presumably it’s decent. You can write good software in any language, so it doesn’t prove that the language itself is good. IMO JS is a popular language, not a good language.

          • hperrin@lemmy.ca
            link
            fedilink
            English
            arrow-up
            5
            ·
            edit-2
            7 hours ago

            I’ve never really found the type conversions that bizarre, unless you’re doing something weird like casting an array to a string or number. I don’t really use strange type casts, since I use TypeScript and avoid using the “==“ operator. What other things make it not good?

            • arcterus@piefed.blahaj.zone
              link
              fedilink
              English
              arrow-up
              10
              ·
              6 hours ago

              I mean, just the fact that you’re using TS instead of plain JS (and that TS even exists) should tell you that the language has issues…

              • hperrin@lemmy.ca
                link
                fedilink
                English
                arrow-up
                2
                ·
                6 hours ago

                It’s just strict typing on top of plain JS. I like strict typing. Some people like loose typing.

                • arcterus@piefed.blahaj.zone
                  link
                  fedilink
                  English
                  arrow-up
                  7
                  ·
                  6 hours ago

                  I’m pretty sure most people do not like JS’s loosey-goosey, who-knows-what-ur-gonna-get type system, which is why TS is so popular. Not really surprising since the bones of the language were basically spat out in a couple weeks. TS is a custom type system on top of JS, meaning it’s not just JS’s type system expressed through strict typing. They added a bunch of useful features like discriminated unions and so on to make using TS more pleasant than raw JS.

                  TS is actually usable (although NPM and the environment built around it still suck). It’s inherited a bunch of weird shit from JS, but the type system generally makes them bearable.

                  • hperrin@lemmy.ca
                    link
                    fedilink
                    English
                    arrow-up
                    3
                    ·
                    6 hours ago

                    Have you ever looked at the original JS implementation? It looks nothing like what JS is today. Saying the bones were spat out in a couple weeks is like saying Linux was developed in a few months.

                    TS transpiles to JS, and any JS is valid TS. Take any TS, remove the types (and some syntactic sugar) and you have JS. I feel like if you like TS but not JS, you just don’t like loosely typed languages. That’s just a preference. It doesn’t make a language bad.

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

                  I started my career with Visual Basic (3!) and I appreciated the loose typing because it meant I could get going and actually have something running quickly as a newbie. A few years later I switched to C# and saw how an entire class of errors disappeared because of the strong typing. Both have their place, depending on the skill level of the coder and the needs of the application.

              • hperrin@lemmy.ca
                link
                fedilink
                English
                arrow-up
                1
                ·
                6 hours ago

                Considering TypeScript is a superset of JavaScript, you certainly can. But, that generally means you’re using TypeScript poorly.

                  • hperrin@lemmy.ca
                    link
                    fedilink
                    English
                    arrow-up
                    1
                    ·
                    6 hours ago

                    Yeah, I’ve seen a lot of those videos where they do things like {} + [], but why would anyone care what JS does in that case? Unless you’re a shit-ass programmer, you’re never going to be running code like that.

                    The idea behind that kind of type conversion was that JS was originally designed to be extremely lenient. If it ever crashed, the web page would freeze, so it lets you do things other languages just crash from, like divide by zero.

    • CeeBee_Eh@lemmy.world
      link
      fedilink
      arrow-up
      13
      arrow-down
      1
      ·
      11 hours ago

      Taking Immich as an example, there’s a lot of heavy lifting happening there behind the scenes in external libraries that are not written in JS.

      • hperrin@lemmy.ca
        link
        fedilink
        English
        arrow-up
        1
        ·
        9 hours ago

        It’s written for Node and Svelte. But sure, just like nearly all other software, they use external libraries.

    • Oisteink@lemmy.world
      link
      fedilink
      arrow-up
      9
      arrow-down
      6
      ·
      11 hours ago

      So uptime kuma being written in JS proves what about the language?

      90% of the worst software and websites are made in js

      • hperrin@lemmy.ca
        link
        fedilink
        English
        arrow-up
        8
        arrow-down
        1
        ·
        11 hours ago

        Well, all websites are written in JS (on the frontend), so I don’t think that’s fair. And I don’t think 90% of the worst software is made in JS. Even if you’re an Electron hater, Electron apps aren’t bad software, they’re just bloated. There’s tons of shit software written in C. I would guess a lot more than is written in JS, just because more software is written in C. C is also way easier to shoot yourself in the foot.

        Uptime Kuma (and others) show that JS can be used to make awesome software. The language doesn’t really hold you back, it’s just your own skill. If you suck at writing software, it doesn’t matter what language you use, your software will be shit.

        • The_Decryptor@aussie.zone
          link
          fedilink
          English
          arrow-up
          2
          ·
          edit-2
          5 hours ago

          Well, all websites are written in JS (on the frontend)

          Not true anymore unfortunately, some sites are using frameworks compiled to WASM instead.

          e.g. X is apparently using Yew now.

          Edit: Ok the “apparently” is doing heavy lifting, since now I can’t find the original source I read about it. Turns out “X” is a garbage name with no searchability, only an idiot would use it.

        • Oisteink@lemmy.world
          link
          fedilink
          arrow-up
          7
          arrow-down
          4
          ·
          11 hours ago

          So any language is good as I can make great software using it?? IMO js is still a mess and NPM is really full of shit code to prove it.

          • hperrin@lemmy.ca
            link
            fedilink
            English
            arrow-up
            5
            ·
            edit-2
            9 hours ago

            I didn’t say that. You can make great software in Brainfuck, but I don’t think anyone has ever said it is good because of that.

            People do make good software in JavaScript. Knowing JavaScript is an exceptionally useful skill, and JavaScript is pretty easy to become decent at. The learning curve for JavaScript is relatively low. As such, there are tons of JS devs, many of which want to make cool things. JavaScript is undeniably an approachable language. Whether you personally think it’s a good language doesn’t have any bearing on that, but that means tons of people are going to use it to make cool software. To me, its approachability is one of the many things that make it good.