Hacker News new | ask | show | jobs
by losvedir 448 days ago
I was pretty excited about this, but didn't the Serenity browser recently announce they're going with Swift? That kind of takes the wind out of this language's sails.
2 comments

Yeah they've chosen Swift as their C++ successor language for Ladybird (the browser project forked from SerenityOS's browser)

Some work to do with making Swift work with ladybird's garbage collection but my understanding that this work is in progress.

Andreas talks about it here: https://www.youtube.com/watch?v=z1Eq0xlVs3g&t=759s

Hell of a decision.
They came to it through a pretty pragmatic process. They made a list of candidate languages (they haven't discussed what the list was beyond "all the obvious candidates were represented") and assigned existing parts of the codebase to a few engineers asking them to reimplement the feature in the candidate languages. The team found they enjoyed working with Swift the most, and Swift's good support for OOP fit the object model of a web browser very well.
This doesn't imply the decision is any less jaw-dropping.

Besides, polling enjoyment is not exactly what I would describe as a pragmatic approach.

I think they had two overarching criteria:

1 - memory safe (ish)

2 - OOP

Rust was off the table because of number 2. The list gets short after that.

Rust has all the OOP features minus class inheritance, but folks like to repeat otherwise.

All the COM programming patterns can be easily done in Rust.

Here, ray tracing in one weekend, quite closely translated from the original C++ OOP design into Rust.

https://github.com/pjmlp/RaytracingWeekend-Rust

It has to work with the existing C++ code and class hierarchy. And OOP-like API is not good enough. It was not my assessment though. It was theirs.
polling enjoyment is superbly pragmatic! this is a volunteer project that depends critically on the developers continuing to enjoy working on it. once you get past the first cut of "is this a reasonably mature language with a lot of community support behind it that compiles to fast native executables", enjoyment is one of the best ways you can choose between the various candidates. you can pretty much assume that rust/c++/swift/go/kotlin/etc all have the cross-platform support and libraries you will need.
Sure, if you're trying to have a good time it works great! No hate here.