• miridius@lemmy.world
    link
    fedilink
    English
    arrow-up
    31
    arrow-down
    22
    ·
    4 months ago

    builds a new browser from scratch without borrowing existing code

    still chooses to do it in C++

    Epic fail

      • miridius@lemmy.world
        link
        fedilink
        English
        arrow-up
        1
        ·
        4 months ago

        Sure :)

        There are a lot of downsides of C++ compared to more modern languages that make it not a great choice if you’re starting a web browser from scratch

        1. Complexity of the language leading to increased bugs and slower development
        2. Manual memory management is error-prone and leads to issues like memory leaks or segmentation faults. Modern browsers need to handle large amounts of dynamic content, making memory management complicated
        3. C++ lacks some of the built-in safety features of more modern languages, which has led to the majority of security vulnerabilities found in major browsers. It’s so bad that Mozilla invented an entirely new programming language just to deal with this
        4. Compared to higher-level languages, C++ can be slower to develop in, which may impact the ability to quickly implement new web standards or features unless you have a massive team
        5. While C++ is cross-platform, ensuring consistent behavior across different operating systems can be more challenging than with some other languages.
        6. Newer languages often provide built-in support for concurrent programming, garbage collection, and other features useful for browser development, which C++ lacks.

        So tl;dr: a browser but in C++ will take much longer to develop, have fewer features, more bugs, less concurrency and and more security vulnerabilities

      • SorteKanin@feddit.dk
        link
        fedilink
        English
        arrow-up
        12
        arrow-down
        14
        ·
        4 months ago

        C++ is a very old, extremely complex language. There are arguably objectively better modern alternatives, such as Rust.

        • hexabs@lemmy.world
          link
          fedilink
          English
          arrow-up
          24
          ·
          4 months ago

          I agree that Rust is the way to go, but calling something “arguably” & “objectively” in the same breath is a bit of a paradox innit?

          • SorteKanin@feddit.dk
            link
            fedilink
            English
            arrow-up
            3
            arrow-down
            2
            ·
            4 months ago

            Well, it was more to recognize that there is no inherently better programming languages in theory, they all do the same stuff. And some languages are “better” at some stuff just due to the libraries available and nothing to do with the language itself. But yea I do think Rust is an objectively better language than C++.

        • phlegmy@sh.itjust.works
          link
          fedilink
          English
          arrow-up
          14
          arrow-down
          2
          ·
          4 months ago

          Rust is great, but anybody developing something should have the ability to choose whatever programming language they prefer. If you want it made with rust, make it yourself.

          • Excrubulent@slrpnk.net
            link
            fedilink
            English
            arrow-up
            9
            arrow-down
            7
            ·
            4 months ago

            Not everyone with the knowledge to identify this mistake is in a position to personally correct it. Do you have the time and resources to personally build a browser from scratch? No? Why do you assume a random commenter does?

            It doesn’t change the fact that Rust is similarly performant and much safer and will thus be faster to develop and less bug-prone. It’s not a difficult assessment to make. If you want to explain why they’re wrong you can talk about the issue on its merits, but you didn’t choose to, presumably because you can’t.

            • blind3rdeye@lemm.ee
              link
              fedilink
              English
              arrow-up
              7
              ·
              4 months ago

              Their choice of programming language isn’t a ‘mistake’. It isn’t something that is ‘corrected’. It’s a development choice, nothing more. That’s the point. And if some ‘random commenter’ doesn’t like that choice, that’s their problem to fix - not the developers who are actually making the project.

              • Excrubulent@slrpnk.net
                link
                fedilink
                English
                arrow-up
                3
                arrow-down
                3
                ·
                edit-2
                4 months ago

                You said they “should have the ability to choose whatever programming language they prefer”. I have good news for you.

                You have correctly identified that the developers are responsible for their own decisions. They are, you will be very relieved to hear, quite free to make as many poor decisions as they will. Nobody is going to force them to stop.

                Other people are more than capable of identifying that those decisions are mistakes. Now, that could be argued with, you could explain how it’s not a mistake.

                But you haven’t. You just said they should be allowed to do it, but nobody was arguing that they needed to be stopped, just that it was a bad decision.

                Edit: this person didn’t actually say that first quote, but the line of argument proceeded from there, and they did nothing to distance themselves from that point.

            • phlegmy@sh.itjust.works
              link
              fedilink
              English
              arrow-up
              1
              ·
              4 months ago

              I just don’t think it’s fair to tell somebody with over 20 years of experience with C++ that their decision to use C++ in their next project is a ‘fail’.

              Learning a new language will probably not be faster than using one you’re already deeply familiar with.

              I’m not sure why you’re asking me about the merits of C++ over rust, that wasn’t my point. I was simply advocating for personal choice.

              Also, my first sentence was literally praising rust, but I guess I didn’t deepthroat it enough for you to notice? Presumably because you’ve taken the thought of somebody advocating for anything other than rust as a personal attack.

          • SorteKanin@feddit.dk
            link
            fedilink
            English
            arrow-up
            1
            ·
            4 months ago

            Of course, but it still makes sense to think carefully about the advantages of disadvantages of the tools you use when starting any project.

    • ticho@lemmy.world
      link
      fedilink
      English
      arrow-up
      11
      arrow-down
      1
      ·
      4 months ago

      The language choice was because Ladybird started as a component of SerenityOS, which is also written in C++. With this separation, they are free to gradually introduce other language(s) into the codebase, and maybe eventually replace C++ entirely, piece by piece.

      In Hackernews thread about this, the head maintainer mentioned that they have been evaluating several languages already, so we’ll see what the future brings.

      In the meantime, let’s try to be mature about it, what do you say?

    • Diabolo96@lemmy.dbzer0.comOP
      link
      fedilink
      English
      arrow-up
      9
      arrow-down
      1
      ·
      edit-2
      4 months ago

      The dev has 30 years of experience with c++ and a lot of it was on browsers.

      He tried to incorporate rust with the help of “JT”, one of the original rust designers/devs and according to Andreas it didn’t work that well due to the web being too objet oriented or something like that. They both worked together (well, mostly “JT”) to create a new safe programming language called “yakt” that transpile to c++, but the project is currently pretty much dead because nobody is really working on it anymore.

      • neclimdul@lemmy.world
        link
        fedilink
        English
        arrow-up
        5
        arrow-down
        4
        ·
        4 months ago

        The web being too object oriented for rust? Assuming that made sense, who wrote the dang language? If that’s true I’m even less confident they know what they’re doing then I was before.

        • Diabolo96@lemmy.dbzer0.comOP
          link
          fedilink
          English
          arrow-up
          7
          arrow-down
          1
          ·
          edit-2
          4 months ago

          You’re doubting someone’s ability to create a web browser knowing that they specialize in browser development since the early 2000s?

          If this isn’t enough to have confidence in them then nothing will.

    • witx@lemmy.sdf.org
      link
      fedilink
      English
      arrow-up
      9
      arrow-down
      4
      ·
      edit-2
      4 months ago

      I’m not sure 10 years old are allowed on the internet. Isn’t it time for Coco and bed?

      I agree that Rust would be an interesting choice for this project but there’s a reason why this particular project is done in C++

      • miridius@lemmy.world
        link
        fedilink
        English
        arrow-up
        1
        ·
        4 months ago

        I wouldn’t go around accusing people of being 10 years old when your English skills are worse than a 10 year old’s. Glass houses and all that.

        • witx@lemmy.sdf.org
          link
          fedilink
          English
          arrow-up
          1
          ·
          edit-2
          4 months ago

          English is not my first language. I saw the mistake and left it here. You fixated on that simple mistake instead of answering the main point