31 comments

[ 4.4 ms ] story [ 57.9 ms ] thread
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.

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++.
Ah, that's too bad. Does that mean their own programming language, Jakt, is back on the table?
I remember mocking the switch to Swift back then.

Swift is a poorly designed language, slow to compile, visibly not on path to be major system language, and they had no expert on the team.

I am glad they are cutting their losses.

Great, some languages do not need to be hack into a project.
There's no way to say this without sounding mean: Everything Chris Lattner has done has been a "successful mess". He's obviously smart, but a horrible engineer. No one should allow him to design anything.

Edit: I explained my position better below.

Why did Ladybird even attempt this with Swift, but (I presume) not with Rust? If they're going to go to the trouble of adding another language, does Rust not have a better history of C++ interop? Not to mention, Swift's GC doesn't seem great for the browser's performance.
I remember watching the project lead say something like “the developers just don’t enjoy rust”
Swift doesn't use a garbage collector.
ARC is GC, Swift definitely uses GC.

It isn't a _tracing_ GC

I hate to be the one to point this out but really, in 10 years, how many rust ports will face the same fate?
Hard to feel excited for this project when it feels so handwavey and when basic technical decisions have never been nailed down.

What are other projects trying something similar that deserve attention?

Regardless of the language it is written in, one thing that I hope Ladybird will focus on when the time comes is a user-respecting Javascript implementation. Regardless of what the Web standards say, it is unacceptable that websites can (ab)use JS against the users for things such as monitoring presence/activity, disabling paste, and extracting device information beyond what is strictly necessary for an acceptably formatted website. One approach could be to report standardized (spoofed) values across the user base so that Ladybird users are essentially indistinguishable from each other (beyond the originating IP). This is more or less the approach taken by Tor, and where a project like Ladybird could make a real difference.
A web browser that explicitly does its own thing regardless of web standards is the last browser in the world I would consider using.
Their Mac UI is a thin layer of AppKit. Even there they're currently using Objective-C++ it looks like, not Swift:

https://github.com/LadybirdBrowser/ladybird/tree/master/UI/A...

Hi, I'm the one who originally wrote Ladybird's AppKit UI. Just FYI, it was written long before Ladybird split from SerenityOS, and even longer before Swift was on the table. I only chose Objective-C++ because it was the language I was familiar with at the time :)
As someone who first began using Swift in 2021, after almost 10 years in C#/.NET land, I was already a bit grumpy at how complex C# was, (C# was 21 years at that point), but then coming to Swift, I couldn't believe how complex Swift was compared to C# - Swift was released in 2014, so would've been 8 years old in 2022. How is a language less than half the age of C# MORE complex than C#?

And this was me trying to use Swift for a data access layer + backend web API. There's barely any guidance or existing knowledge on using Swift for backend APIs, let alone a web browser of all projects.

There's no precedent or existing implementation you can look at for reference; known best practices in Swift are geared almost entirely towards using it with Apple platform APIs, so tons of knowledge about using the language itself simply cannot be applied outside the domain of building client-running apps for Apple hardware.

To use swift outside its usual domain is to become a pioneer, and try something truly untested. It was always a longshot.

In the last years, simplistic languages such as Python and Go have “made the case” that complexity is bad, period. But when humans communicate expertly in English (Shakespeare, JK Rowling, etc) they use its vast wealth of nuance, shading and subtlety to create a better product. Sure you have to learn all the corners to have full command of the language, to wield all that expressive power (and newcomers to English are limited to the shallow end of the pool). But writing and reading are asymmetrical and a more expressive language used well can expose the code patterns and algorithms in a way that is easier for multiple maintainers to read and comprehend. We need to match the impedance of the tool to the problem. [I paraphrase Larry Wall, inventor of the gloriously expressive https://raku.org]
same. i thought it would have been as quick to pick up as rust. nowhere near. i spent weeks trying to go through every feature of the language at least once. time in which i could’ve read several rust books and already start hacking up some interesting projects. so much in swift is pointless syntax sugar. why do i need 50 ways to do exactly the same thing, it’s just nonsense. then i have to look up the language reference whenever i read a new codebase
Swift is Apple's toy language and they cannot and will not allow it to be anything more than that.