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
Complexity of the language leading to increased bugs and slower development
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
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
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
While C++ is cross-platform, ensuring consistent behavior across different operating systems can be more challenging than with some other languages.
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
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++.
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.
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.
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.
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.
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.
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?
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.
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.
Using my decades of experience in how programming and compilers works and the fact Mozilla has used it to great effect and how it is being used for parts of the Linux kernel… Yeah just a general statement it doesn’t make any sense.
Maybe they aren’t effective at designing software with the paradigms of the language or they don’t like it but the given explanation doesn’t track.
Epic fail
Not sure if you are trying to be funny, but if not: enlighten us?
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
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
C++ is a very old, extremely complex language. There are arguably objectively better modern alternatives, such as Rust.
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?
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++.
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.
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.
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.
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.
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.
Of course, but it still makes sense to think carefully about the advantages of disadvantages of the tools you use when starting any project.
deleted by creator
I am not the one who said “epic fail”.
Sorry, replied in the wrong comment level apparently.
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?
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.
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.
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.
Using my decades of experience in how programming and compilers works and the fact Mozilla has used it to great effect and how it is being used for parts of the Linux kernel… Yeah just a general statement it doesn’t make any sense.
Maybe they aren’t effective at designing software with the paradigms of the language or they don’t like it but the given explanation doesn’t track.
I am pretty sure it was about how it was difficult for them to do oop with rust, but I reckon it was long ago and my programming knowledge is minimal.
https://rl.rootdo.com/r/rust/comments/yuxb8a/serenityos_author_rust_is_a_neat_language_but
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++
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.
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
Rust or bust
Then build a browser in rust…
Servo exists
That’s a web rendering engine, not a web browser application. You need a lot of stuff other than the engine to make a browser.
The engine is where like 95% of the complexity lies though. Maybe more.