• dis_honestfamiliar@lemmy.world
    link
    fedilink
    arrow-up
    28
    arrow-down
    11
    ·
    5 months ago

    I wish death upon it, but it just won’t die. I guess that’s cuz it’s the only frontend. Or at least the only frontend that allows DOM manipulation.

      • dis_honestfamiliar@lemmy.world
        link
        fedilink
        arrow-up
        1
        ·
        5 months ago

        Document ObjectModel. Think using code to add a JavaScript to make a drodown menu appear like for a navigation bar. That would be manipulation. And I think there’s so much more Angular and React do with DOM that I don’t know enough to explain it.

    • jimmy90@lemmy.world
      link
      fedilink
      arrow-up
      4
      arrow-down
      2
      ·
      edit-2
      5 months ago

      thanks to wasm any language is a browser running language. JS is relegated to some token binding boilerplate as part of any framework and with things like servo/tauri rendering html will be pure rust

      • coloredgrayscale@programming.dev
        link
        fedilink
        arrow-up
        11
        ·
        5 months ago

        thanks to wasm any language is a browser running language.

        Theoretically yes, practically you may have to deliver a whole runtime depending on the languagey making websites even bigger and slower to load initially. And unless it’s a webapp with data processing on the client the perceived performance benefits may be negligible.

        • jimmy90@lemmy.world
          link
          fedilink
          arrow-up
          3
          arrow-down
          5
          ·
          5 months ago

          correct

          good languages like rust have tiny bundles and initialize in microseconds, of course :)

    • masterspace@lemmy.ca
      link
      fedilink
      English
      arrow-up
      23
      arrow-down
      25
      ·
      edit-2
      5 months ago

      It’s because it’s a great language. Legitimately cannot understand why anyone would dislike it, especially with the the ES5+ editions and the advent of Typescript.

      I started with C#, and have used Python, Java, PHP, and Ruby in professional capacities and still find Typescript to be my favourite by a significant margin.

      • Mia@lemmy.blahaj.zone
        link
        fedilink
        arrow-up
        23
        arrow-down
        4
        ·
        edit-2
        5 months ago

        People dislike JS because it’s packed full of moronic footguns and technical debt. The “standard library” is full of baffling decisions and, much like the language, rarely does what you expect. Even its creator agrees it’s a terrible language and should have been replaced by now.

        TypeScript is better, but at the end of the day it’s just an illusion. Add an any anywhere, which will happen, and you’re back to square one. It also still inherits some of the weirdness of JS, because it is just JS with fake types bolted on. Plus, the amount of work one has to do to create a proper library with TypeScript support completely undermines the few advantage of JavaScript. Might as well use a real statically typed language at that point, at least you’d be sure your types are actually enforced.

        Also, the whole web ecosystem is ass. The hoops one has to jump through nowadays to do web development are absolutely batshit crazy. And no, having a create-whatever that sets things up for you is not a real solution.

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

          Also, the whole web ecosystem is ass. The hoops one has to jump through nowadays to do web development are absolutely batshit crazy.

          I don’t recall the experience being even equally pleasant in other languages, let alone better.

          • Mia@lemmy.blahaj.zone
            link
            fedilink
            arrow-up
            12
            ·
            edit-2
            5 months ago

            It definitely isn’t in some circumstances.
            Frankly I’d put C/C++ in a similar category when it comes to compilation.
            Dealing with Make, CMake, linkage and all that can be a nightmare.
            The ecosystem is a little bit better though in my opinion. If nothing else you get a proper standard library and don’t have to rely on thousands of dependencies to get anything done… or you often roll your own if you are in C… which is meh.

            I find Rust, C#, Go and anything slightly more modern to be a great or at least good experience.
            Python as well if you use venv and your runtime and package versions align.

            My point is, there is no perfect platform and ecosystem, but the web is generally regarded as one of the poorest.
            I’m not saying someone can’t enjoy working on web stuff, they most certainly can. But it is objectively overcomplicated.

            • Feathercrown@lemmy.world
              link
              fedilink
              English
              arrow-up
              6
              ·
              5 months ago

              I won’t argue that the web is complicated, but a lot of that complexity comes from the necessity of supporting so many different environments that you can’t control.

              I’d also like to ask when the last time you used JS was-- we use one UI framework (Angular) but no lodash, jquery, etc. to provide library functionality. Everything’s just built into JS now.

              • Mia@lemmy.blahaj.zone
                link
                fedilink
                arrow-up
                5
                arrow-down
                1
                ·
                edit-2
                5 months ago

                I can understand accounting for different environments. That’s unfortunately unavoidable. But I found web framework developers in particular have a weird tendency of piling up ungodly amounts of abstractions just for the sake of it.

                It’s kind of a cultural problem in modern software development in general imo. It’s not limited to web dev by any means, but it’s particularly bad there because JS lends itself to it quite well.

              • Mia@lemmy.blahaj.zone
                link
                fedilink
                arrow-up
                2
                ·
                edit-2
                5 months ago

                I had to go back to working with React just recently. I’m technically using TS, but the standard library is the same anyways. It hardly has everything imo.
                It does have what it needs to interface with the browser, and quite a few -sometimes poorly thought out- facilities, but not much more.

                Don’t get me wrong, for a web scripting language it’s plenty, but if one wants to use JS for stuff that isn’t just putting a simple page on a screen, that’s not enough.

                Maybe you mean Node instead of JS?

            • Valmond@lemmy.world
              link
              fedilink
              arrow-up
              6
              arrow-down
              1
              ·
              5 months ago

              C# with the M$ echosystem sucks ass though. It’s like at first wow nice language, now how do you do this or that basic stuff and it’s just crap.

              I want a Map. map map; ? Oh no ; Map map=new(); ???

              Where are the destructors?

              Etc.

              I get the feeling it’s too steered by the corporate and not enough open source.

          • Amju Wolf@pawb.social
            link
            fedilink
            English
            arrow-up
            4
            ·
            5 months ago

            For all the hate PHP gets (or used to get) it’s ecosystem is amazing. And so is the language and standard library itself for the most part. It still inherits some of the original issues, but a lot of work has been done to minimize them.

        • masterspace@lemmy.ca
          link
          fedilink
          English
          arrow-up
          8
          arrow-down
          7
          ·
          edit-2
          5 months ago

          People dislike JS because it’s packed full of moronic footguns and technical debt.

          Lol, no it’s not. The literal only footgun is the truthiness aspect of equality and using ===, and it’s really not hard to figure out and avoid. Especially given that linters will automatically flag it for you.

          TypeScript is better, but at the end of the day it’s just an illusion. Add an any anywhere, which will happen, and you’re back to square one.

          It is extremely easy to not let any slip into your code, you do this little thing called review code before merging. Crazy, I know, but by just following the most basic software development practices it turns out you can also avoid other basic junior mistakes! Wild right?

          And lmao, oh my god the web ecosystem is ass because a framework for producing robust complex applications isn’t just an html and CSS file? Lmao bruh, tell me you’ve never coded in a different language without saying you’ve never coded in a different language. You think a .csproj or a .gradle file is simpler and more intuitive?

          You’re mistaking basic junior programming mistakes for issues with the language.

          • Mia@lemmy.blahaj.zone
            link
            fedilink
            arrow-up
            13
            arrow-down
            3
            ·
            edit-2
            5 months ago

            Lmao bruh, tell me you’ve never coded in a different language without saying you’ve never coded in a different language.

            I’ve been a software developer for over 10 years, on both on the front end and the back end.
            I’ve worked with jQuery, React, plain old DOM manipulation, god damn PHP. I’m not new to web development.

            Outside of web technologies, I’ve worked on nautical charts processing software and microcontroller firmware in C, C++ and Rust.
            I’ve worked on native GUI applications with C++, Java and C# using JavaFX, WPF, GTK, Qt.
            All under strict corporate standards.
            I also work on compilers and rendering engines in my spare time.

            So no, I’m not a “junior programmer” making “basic junior programming mistakes”. Your favourite language is ass.
            You shouldn’t immediately jump to the conclusion that someone has never written a line of code only because they say so.
            Sorry if it hurts your feelings, but even senior developers, web or otherwise, say it. I’m not the one swimming against the current, you are.

            And lmao, oh my god the web ecosystem is ass because a framework for producing robust complex applications isn’t just an html and CSS file?

            Alright, let’s do a little experiment, shall we? Let’s try and create an empty electron app with React and TypeScript.
            A quick create-electron-app and some configuring TS, ESLint and WebPack later we reach a whopping 3_087_725 lines of code. 3 million lines. ~700MB.
            This all requires a linting step, a pre-compilation step though tsc, multiple additional translation steps through webpack for older ES versions.
            All of that for an empty page on a webview.

            This is batshit crazy. And I come from fucking CMake for crying out loud.
            There is nothing robust about this, the slightest misstep and your sourcemaps are fucked.
            Whoops the author of left-pad decided to pull it from npm - half the JS ecosystem on its knees.
            Whoops the author of is-even one day decides it’s a stupid package to need - half the JS ecosystem on its knees.

            Web developers are standing on a crumbling, fermenting pile of shit. Get over it.

            With that said, you can still enjoy JS and all the web stuff, there’s nothing wrong with that…

            • masterspace@lemmy.ca
              link
              fedilink
              English
              arrow-up
              2
              arrow-down
              8
              ·
              5 months ago

              Sorry if it hurts your feelings, but even senior developers, web or otherwise, say it. I’m not the one swimming against the current, you are.

              Lmao bro, I don’t think I’m the one with hurt feelings given your unhinged credential boasting and several paragraphs of unprompted bitching about electron.

              You make basic JavaScript mistakes that should be caught by linters, and certainly by any intermediate to senior level reviewer. Get over it and learn to be better and not make basic mistakes.

              • Mia@lemmy.blahaj.zone
                link
                fedilink
                arrow-up
                7
                arrow-down
                2
                ·
                edit-2
                5 months ago

                You seem to confuse “people making mistakes” with “a language that is designed in such a way that those mistakes are not only common, but integral part of the experience.”

                I’m not saying I make such mistakes, I say the design is crap. It’s not a skill issue, it’s a design issue. People say null pointers were a mistake. I’m inclined to agree. Not because I get a null pointer exception every five minutes, but because there are better ways to handle cases like that.

                You said I was a rookie, I proved you wrong.
                You said there was nothing crazy about web application complexity, I provided you with a common, glaring example. There’s nothing unhinged in saying “look I installed Electron and React and not my project has 3 million lines of crap I have to worry about”.
                Everything else was just emphasis for the sake of it.

                But when you don’t have a valid argument, you resort to personal attacks. Maybe it’s you that should learn to be better.

                • urshanabi [he/they]@lemmygrad.ml
                  link
                  fedilink
                  arrow-up
                  1
                  ·
                  5 months ago

                  Hi, I don’t really code besides computation stuff in Python. You seem to be really knowledgeable, could I ask, what does the future of the web look like? Is it Rust and WASM? Or will JS and TS always have a place even a decade from now?

                • masterspace@lemmy.ca
                  link
                  fedilink
                  English
                  arrow-up
                  2
                  arrow-down
                  3
                  ·
                  edit-2
                  5 months ago

                  I’m not saying I make such mistakes, I say the design is crap. It’s not a skill issue, it’s a design issue.

                  That’s what people with skill issues tend to say.

                  You learned how to write == in every other language, but you can’t figure out === in typescript?

                  You’re bitching and whining about a tiny syntax issue that enables backwards compatibility for literally every web site ever created.

                  You said I was a rookie, I proved you wrong.

                  You apparently still bitch and whine like a rookie. Maybe work on your emotional maturity if you want to come across as an experienced senior and not just a Reddit-read edge lord.

                  You said there was nothing crazy about web application complexity, I provided you with a common, glaring example.

                  No, you didn’t.

                  There’s nothing unhinged in saying “look I installed Electron and React and not my project has 3 million lines of crap I have to worry about”.

                  Yes, there is, given that the vast majority of web applications run in this thing called a web browser, and you decided to instead choose the project example where you install a whole web browser alongside operating system shims into your project.

      • AlecSadler@sh.itjust.works
        link
        fedilink
        arrow-up
        14
        ·
        5 months ago

        I worked for a company that refused to use TypeScript because it “slowed devs down”. It was…a laughable period in my life.

      • arendjr@programming.dev
        link
        fedilink
        arrow-up
        9
        arrow-down
        1
        ·
        5 months ago

        As much as people like to make fun of JS/TS, I think you’re right, especially compared to the languages you mentioned. It’s my second-favorite language after Rust.

        I think I would put Swift above it as well, except I don’t really use it since it’s too domain-specific in practice.

        • leisesprecher@feddit.org
          link
          fedilink
          arrow-up
          15
          arrow-down
          1
          ·
          5 months ago

          The newest iteration of the language might be okay, but the ecosystem is an absolute mess.

          Working with npm projects is always a pain, everything changes all the time for no reason, and often enough in subtle ways you can’t anticipate.

          Plus, there’s just an army of not very good and/or inexperienced developers vomiting their incompetence into the ecosystem.

          Languages are not isolated. Java doesn’t force abstractFactoryBuilders, yet hundreds of developers follow that pattern. So Java in practice is rather verbose.

          • masterspace@lemmy.ca
            link
            fedilink
            English
            arrow-up
            7
            arrow-down
            1
            ·
            edit-2
            5 months ago

            Languages are not isolated. Java doesn’t force abstractFactoryBuilders, yet hundreds of developers follow that pattern. So Java in practice is rather verbose.

            Java basically does because it did not support functional programming forever forcing most of the base standard libraries to eschew those patterns (looking at you spring), and because even today it does not treat functional programming as first class and it is difficult to accomplish the same things with it then with other languages.

            It is also missing many extremely common shorthand syntax expressions like optional chaining.

            • leisesprecher@feddit.org
              link
              fedilink
              arrow-up
              6
              ·
              5 months ago

              Not really, no. The over-abstraction Java is often doing is a question of mindset. Java devs tend to be very keen on reusability , which is fine, but often enough the result is unusable.

              The problems behind abstractFactoryBuilders are not inherently unsolvable without these constructs, it’s just that Java devs chose this rather weird approach.

          • count_dongulus@lemmy.world
            link
            fedilink
            arrow-up
            6
            ·
            5 months ago

            The language and its standard libraries lead developers towards common patterns. Javascript’s standard library is pretty sparse excluding browser-only web apis, so there are tons of external libraries to fill the gap for better or worse.

          • arendjr@programming.dev
            link
            fedilink
            arrow-up
            2
            ·
            5 months ago

            I absolutely agree with you. If I can avoid NPM I will indeed do so. Sometimes that means using Deno, but sometimes it can be a valid reason to avoid using the language altogether. And sometimes we have to suck it up 🤷‍♂️

  • anti-idpol action@programming.dev
    link
    fedilink
    arrow-up
    12
    arrow-down
    1
    ·
    edit-2
    5 months ago

    wonder when Rust will saturate it’s niche as a C/C++ replacement, I’d guess 3-6 years would be when we might start to see some stabilization.