6 ms·
> We know the result isn’t idiomatic Rust, and there’s a lot that can be simplified once we’re comfortable retiring the C++ pipeline. That cleanup will come in
by qudat 8mo ago
> We know the result isn’t idiomatic Rust, and there’s a lot that can be simplified once we’re comfortable retiring the C++ pipeline. That cleanup will come in time.
Correct me if I’m wrong since I don’t know these two languages, but like some other languages, doing things the idiomatic way could be dramatically different. Is “cleanup” doing a lot of heavy lifting here? Could that also mean another complete rewrite from scratch?
A startup switching languages after years of development is usually a big red flag. “We are rewriting it in X” posts always preceded “We are shutting down”. I wish them luck though!
- samiv 8mo agoThis is the famous trap that Joel on Software talked about in a blog post long time ago. If you do a rewrite you essentially put everything else on halt while rewriting. If you keep doing feature dev on the old while another "tiger team" is doing the rewrite port then these two teams are essentially in a race against each other and the port will likely never catch up. (Depending on relative velocities) Maybe they think that they can to this LLM assisted tools in a big bang approach quickly and then continue from there without spending too much time on it.
- JumpCrisscross 8mo ago> then these two teams are essentially in a race against each other and the port will likely never catch up Ladybird appears to have the discipline to have recognized this: “[Rust] is not becoming the main focus of the project. We will continue developing the engine in C++, and porting subsystems to Rust will be a sidetrack that runs for a long time.”
- safercplusplus 8mo agoAnd I might suggest that there's the possibility that the C++ code could end up being more cleanly ported to a memory-safe subset of C++. plug: https://github.com/duneroadrunner/scpptool/blob/master/approach_to_lifetime_safety_summary.md https://github.com/duneroadrunner/scpptool/blob/master/appro...
- christophilus 8mo agoI’ve been part of at least 2 successful rewrites. I think that Joel’s post is too often taken as gospel. Sometimes a rewrite is the best way forward. Moving Ladybird from C++ to a safer more modern language is a real differentiator vs other browsers, and will probably pay dividends. Doing it now is better than doing it once ladybird is fully established. One last point about rewrites: you can look at any industry disruptor as essentially a team that did a from-scratch rewrite of their competitors and won because the rewrite was better.
- abuyalip 8mo agoI still don’t buy this “safer more modern” mentality. Modern C++ pretty much solves the safety issues. People need to learn how to use tools properly. If you ask me, Go is a better Rust. Rust is an ugly version of C++ with longer compile times and a band of zealous missionaries. I mean the keywords mut and fn very annoying to read just get rid of them or spell the f*n thing function.
- nicoburns 8mo ago> Modern C++ pretty much solves the safety issues. The statistics from projects that have adopted Rust and measured the effect say otherwise. See https://security.googleblog.com/2025/11/rust-in-android-move-fast-fix-things.html https://security.googleblog.com/2025/11/rust-in-android-move... for example.
- steve1977 8mo agoThis article is not really specifying if Rust is compared against "Modern C++" or "Old School C++". The only thing we can assume is that at least part of it is "Google C++". Maybe we would see similar effects adopting Modern C++. Maybe not. The article doesn't tell us.
- bogeholm 8mo agoYeah I guess most True Scotsmen write modern C++ after all.
- simonw 8mo agoNearly 26 years ago! https://www.joelonsoftware.com/2000/04/06/things-you-should-never-do-part-i/ https://www.joelonsoftware.com/2000/04/06/things-you-should-... What's different today really is the LLMs and coding agents. The reason to never rewrite in another language is that it requires you to stop everything else for months or even years. Stopping for two weeks is a lot less likely to kill your project.
- oblio 8mo agoHe's still right if you don't have good automated testing and you lost most of the original developers (or you don't have other seniors ceva familiar with the domain).
- simonw 8mo agoHah, yeah if you don't have a comprehensive test suite any rewrite will be a disaster - step one is to get the test suite up to code.
- ignoramous 8mo ago> What's different today really is the LLMs and coding agents. In Ladybird's case, tests they could rely upon.
- raincole 8mo agoThe context matters when we talk about Joel's article[0]. It's about Netscape. By the time, Netscape had dominated the browser market. It was the leader and that means they had all the market share to lose. You can bet Microsoft's decision makers were very closely monitoring what those at Netscape were doing. Today, practically nobody uses Ladybird. No one even knows it[1]. It's so behind and has nothing to lose. If you really want to rewrite, it's better to do it when you have nothing to lose. [0]: https://www.joelonsoftware.com/2000/04/06/things-you-should-never-do-part-i/ https://www.joelonsoftware.com/2000/04/06/things-you-should-... [1]: to quote Joel, "no one" means less than one million people.
- gaigalas 8mo ago> A startup switching languages after years of development is usually a big red flag. Startups are not a good comparison here. They have a different relationship with code than software projects. Linux has rewriten entire stacks over and over again. The PHP engine was rewritten completely at least twice. The musl libc had entire components rewritten basically from scratch and later integrated.
- jvillasante 8mo agoExactly my thought! I guess I'll keep Firefox for the foreseeable future...
- einpoklum 8mo agoFirefox is already spying on you with a lot of telemetry, and they have recently amended their terms of use to remove the obligation to "never sell your data" [1]. So perhaps you should reconsider that statement. [1] : https://news.ycombinator.com/item?id=43213612 https://news.ycombinator.com/item?id=43213612
- tvshtr 8mo agoSurely nobody's using them forks which exist for no reason whatsoever.
- nicoburns 8mo agoA mitigating factor in this case is the C++ and Rust are both multi-paradigm languages. You can quite reasonably represent most C++ patterns in Rust, even if it might not be quite how you'd write Rust in the first place.
- array_key_first 8mo agoIn addition, C++ and Rust are very, very similar languages. Almost everything in C++ translates easily, including low level stuff and template shenanigans. There's only a few "oh shit there's no analog" things, like template specialization or virtual inheritance. Out of all the languages rust takes inspiration from, id rank C++ at the top of the list.
- pornel 8mo agoStrong disagree. Rust copied C++ syntax to avoid looking weird to C++ programmers, but the similarity is skin deep. C can be tamed, because it's mostly a subset of Rust, but C++ idioms are a death from papercuts. OOP, weakly-typed templates, and mutable aliasing create impedance mismatch in almost every C++ API. Rust doesn't have data inheritance, and what looks like interface inheritance is merely extra requirements in a flat list of traits, so subclassing won't behave like C++ APIs expect. When you translate a class hierarchy to Rust, it needs lots of crutches which make it weird, boilerplatey, and tedious to use. There's no good recipe for OOP hierarchy in Rust, because the idioms are so different. The mismatch feels like writing an ORM. For some C++ APIs mutability and circular references can be a pain too. Rust works well with DAG data structures and clear mostly-immutable data flow. Objects with some "parent" pointer are common in C++, but Rust sees them as potentially dangling, with shared mutable state, and requires much heavier control of them. It can be done, but it's ugly. Idiomatic Rust designs go to great lengths to avoid it unless necessary, but C++ APIs can have the extra pointers "for convenience". There's a reason why Rust doesn't have typical GUI libraries - an arbitrary web of references between widgets and event handlers make it ugly in Rust, and that's on top of a view class inheritance. C++ templates sit very uncomfortably between Rust's macros (duck typed) and Rust's generics (strictly typed at point of declaration). C++ templates almost always are a mix of types they're attached to and some duck-typing in their expansion. Rust's generics do not allow any duck typing at all. This makes translation of even a tiny bit clever C++ templates a chore. There's no specialization. No way to deal with SFINAE and such. Rust macros have flexibility for all the syntax shenanigans (and even similarly bad errors at instantiation time), but macros can't see any types. Idiomatic Rust has very deliberate division between traits (usually much simpler and smaller in scope), macros and proc macros/derives. Splitting C++ templates like that can be a major redesign.
- ozgrakkurt 8mo agoSpending weeks porting (presumably) working code with LLM is a bit strange
- blibble 8mo agothat's only the mechanical translation too the hard bit (borrow checker) has still to be done...
- renewiltord 8mo agoTwitter is the canonical startup rewrite. It worked.