Live data from Hacker News

Closing this as we are no longer pursuing Swift adoption

github.com

1–10 of 332 posts

Re: Closing this as we are no longer pursuing Swift adoption

#4
Not too surprising. Swift is too tied to Apple and it's not really clear what the benefit would be relative to a subset of C++ written with contemporary memory safety practices. It's a battle tested choice and pretty much every browser actually in use is written in C++.

Re: Closing this as we are no longer pursuing Swift adoption

#5
The commit removing Swift has a little bit more detail:

    Everywhere: Abandon Swift adoption

    After making no progress on this for a very long time, let's acknowledge
    it's not going anywhere and remove it from the codebase.
https://github.com/LadybirdBrowser/ladybird/commit/e87f889e3...

Re: Closing this as we are no longer pursuing Swift adoption

#7
post #3

That's interesting, what happened? They don't explain it there. For the record, I don't have a dog in this fight. As long as it runs on Linux, I'm willing to test drive it when it's ready.

It looked to me like it was just due to recurring build issues. Lots of "swift can't import these conflicting C++ versioned libraries concurrently" and "can't use some operator due to versioning or build conflicts". Basically it sounds like trying to add swift to the project was breaking too many things, and they decided it wasn't worth it.

It's a shame, I think swift is an underappreciated language, however I understand their reasoning. I think if they tried to just use swift from the beginning it would have been too ambitious, and trying to add swift to a fragile, massive project was probably too complex.

Re: Closing this as we are no longer pursuing Swift adoption

#8
post #4

Not too surprising. Swift is too tied to Apple and it's not really clear what the benefit would be relative to a subset of C++ written with contemporary memory safety practices. It's a battle tested choice and pretty much every browser actually in use is written in C++.

Well, it was a terrible idea in any case unless it was for high-level-ish code only. Swift generally can't compete with C++ in raw performance (in the same way as Java - yeah, there are benchmarks where it's faster, but it basically doesn't happen in real programs).

Re: Closing this as we are no longer pursuing Swift adoption

#9
post #4

Not too surprising. Swift is too tied to Apple and it's not really clear what the benefit would be relative to a subset of C++ written with contemporary memory safety practices. It's a battle tested choice and pretty much every browser actually in use is written in C++.

> It's a battle tested choice and pretty much every browser actually in use is written in C++.

Every browser in use is stuck with C++ because they're in way too deep at this point, but Chromium and Firefox are both chipping away at it bit by bit and replacing it with safer alternatives where they feasibly can. Chromium even blocked JPEG-XL adoption until there was a safe implementation because they saw the reference C++ decoder as such a colossal liability.

IMO the takeaway is that although those browsers do use a ton of C++ and probably always will, their hard-won lessons have led them to wish they didn't have to, and to write a brand new browser in C++ is just asking to needlessly repeat all of the same mistakes. Chromium uses C++ because Webkit used C++ because KHTML used C++ in 1998. Today we have the benefit of hindsight.

Post reply on HN