4 ms·
I'll take an alternative browser engine, even if it's written in C++. > I'm curious Is it really curiosity though? Because the answer is straightforward, the
by jraph 2y ago
I'll take an alternative browser engine, even if it's written in C++.
> I'm curious
Is it really curiosity though? Because the answer is straightforward, the project started as a hobby, the developer picked whatever language they were proficient in. Andreas is open with the fact that he started Serenity OS and LadyBird as a rehab project. Put too much barrier in this setting (like learning a new language and all the ecosystem) and it might not happen at all.
- znpy 2y ago>> I'm curious > Is it really curiosity though? I'm kind of annoyed at this whole train of comments ("I'm curious..."). In so many occasion I see something cool and the main comment track is "why hasn't this been writte in rust?" (or some other allegedly safe/better programming language). It's like seeing a beautiful painting being painted and arguing about the kind of paintbrush the painter has used. It's so sad.
- red_trumpet 2y ago> It's like seeing a beautiful painting being painted and arguing about the kind of paintbrush the painter has used. It's like seeing a beautiful painting and realizing the painter didn't use lightfast colors. In ten years the painting will not be beautiful anymore. Yes, the painter / author put in a lot of work, and this deserves acknowledgement. But ones decision to use it or not is not only based on the amount of work put in.
- account42 2y agoIt's more like seeing a beautiful painting and complaining that the painter didn't use your favorite brand of paint which promises to be much better looking than the other paints in ten years but hasn't even been around that long.
- nindalf 2y agoThis analogy has been tortured beyond usefulness.
- voidwtf 2y agoThat’s a pretty cynical view. It’s more like asking why a car manufacturer is developing a car without modern safety mechanisms despite knowing those mechanisms save lives. If this is a work of art whose code is to be admired and only viewed as a creative work, fine I’m sorry I asked the question and that it was criticism of one’s vision. However, if this is something that is intended to be “driven” by other users in the future I think it’s a perfectly acceptable question to ask why more modern safety mechanisms are not being employed. Maybe there is a rationale I’m unaware of or a reason why those mechanisms are not employed.
- jraph 2y agoIt's not cynical. It's how many of us feel when we read a comment like this. I believe you are right. But I also think that your phrasing is not very nice. It shows a lack of empathy and understanding and feels entitled. You could convey essentially the same message but be way nicer to everyone involved, and that would be way more efficient. If your ideal is a browser engine written in a safer language, and want to work towards that goal, phrasing things the way you did in your comment is one of the worst way to do it because you risk putting off people and they will associate this bad feeling to your idea. See how people react to comments about Rust. Some of your options are: - writing a browser engine yourself, in a safer language - contributing to an existing browser engine like Servo - convince projects to switch to a safer language, or to accept contributions in a safer language - convince someone or a group of people to do those things - fund such an enterprise At this point, the world needs proof that a browser engine can practically be written in something else than C++, because it's what all three major engines are written in. There are strong evidences that Rust can be an option given the existence of Servo, but look how Ladybird is progressing so absurdly faster than Servo. If you don't work yourself towards your goal, you can only humbly share your wish. Lobbying is fine too, but you really need to make sure you don't make others hate your idea because of the way you communicate. Specifically in this topic, you need to take in account that many people are already annoyed by the numerous "why not Rust" comments, so you are walking on eggshells. What's more, don't forget the global picture, and that security (although critical, we agree) is only one aspect. Security is irrelevant in a project that doesn't even exist. C++ is better than other languages for a lot of reasons in other aspects and you will need to address this, in the context of writing a browser. Good luck in your endeavors, I hope you succeed, I believe it's a good ideal.
- m000 2y ago> It's like seeing a beautiful painting being painted and arguing about the kind of paintbrush the painter has used. No it is not. You don't use your browser for its artistic value (which is in the eye of the beholder). You also don't make an announcement for a painting. This is more like using a non-inox screw in a high-humidity environment. Yes, it will hold on for a while. But it is objectively a bad choice. Non-inox may had been the only choice 300 years back, but this is 2024. And writing a browser from scratch is a huge undertaking. When you invest resources in such a project, you probably want it to be more weatherproof than its C/C++-based predecessors. So it is quite reasonable IMHO to ask why C++ was chosen for this project.
- ArtixFox 2y ago90% of all safety critical software is written in c/c++ There is no good safety language right now to write a browser in, except for c/c++. Rust might sound like an alternative but it's safety story is sad when compared to c/c++. Ada might be a cool option, so is ATS.
- notfed 2y agoThe question ("Why not a memory safe language?") has never been more appropriate than when we're talking about writing a web browser.
- almostgotcaught 2y ago> Is it really curiosity though? it's not - it's a stock standard way to ask a question in bad faith.
- voidwtf 2y agoIt’s curiosity because I’m involved in software security for the company I work for and I’m a software developer that primarily works with managed languages. I unfortunately lack the technical expertise to make an assessment on interpreters and virtual machines. I am, however, aware that many of the CVEs that I review involve reading/writing memory outside the intended bounds. Many of these while processing user generated content. I appreciate that the author birthed the project as a way to direct his energies towards more productive means. I don’t think it’s relevant to the question though.