Live data from Hacker News

Ladybird browser to start using Swift language this fall

twitter.com

1–10 of 205 posts

Re: Ladybird browser to start using Swift language this fall

#3

One thing I don't understand about Swift is why it uses a private fork of LLVM. Why can't they upstream whatever changes they need?

Because the same also applies to clang, and contrary to what people think, Apple like every other big tech, is only as nice to FOSS as they need to be for their own purposes.

Same applies to all C and C++ compiler vendors, that have replaced their proprietary compilers (there are plenty more than just clang/gcc/msvc), with LLVM.

Such is the freedom of Apache/MIT/BSD style licenses.

Re: Ladybird browser to start using Swift language this fall

#4
I would have thought that Ladybird would be using a language that specifically guarantees memory safety which is Rust. But Swift is a very surprising choice but actually makes sense for a browser.

The browser story is not great for Rust as we can only point to Servo which isn't ready to be used as a daily driver for millions of users. But Arc Browser is written with a combination of Swift and C++ to run on macOS and Windows.

Other than iOS apps, perhaps Swift found another use-case in large C++ code bases thanks to the C++ interop story.

Re: Ladybird browser to start using Swift language this fall

#5
post #4

I would have thought that Ladybird would be using a language that specifically guarantees memory safety which is Rust. But Swift is a very surprising choice but actually makes sense for a browser. The browser story is not great for Rust as we can only point to Servo which isn't ready to be used as a daily driver for millions of users. But Arc Browser is written with a combination of Swift and C++ to run on macOS and…

I'm not sure if the comparison to Servo holds up since that's a browser engine, and Arcs engine (Chromium) is 100% C++. Swift is only used for the frontend.

Re: Ladybird browser to start using Swift language this fall

#6

One thing I don't understand about Swift is why it uses a private fork of LLVM. Why can't they upstream whatever changes they need?

I’ve just read the swift build guide and there’s no sign of a closed-source version of LLVM. What are you talking about?

Re: Ladybird browser to start using Swift language this fall

#7
==============================

Andreas Kling @awesomekling · 44m

My general thoughts on Rust:

- Excellent for short-lived programs that transform input A to output B

- Clunky for long-lived programs that maintain large complex object graphs

- Really impressive ecosystem

- Toxic community

==============================

Re: Ladybird browser to start using Swift language this fall

#8

One thing I don't understand about Swift is why it uses a private fork of LLVM. Why can't they upstream whatever changes they need?

Doesn't Xcode ship with a closed-source build of LLVM (with patches) that you're referring to.

Re: Ladybird browser to start using Swift language this fall

#9
post #4

I would have thought that Ladybird would be using a language that specifically guarantees memory safety which is Rust. But Swift is a very surprising choice but actually makes sense for a browser. The browser story is not great for Rust as we can only point to Servo which isn't ready to be used as a daily driver for millions of users. But Arc Browser is written with a combination of Swift and C++ to run on macOS and…

> I would have thought that Ladybird would be using a language that specifically guarantees memory safety which is Rust.

Rust isnt the only compiled language that provides memory safety by default. Swift does as well.

Re: Ladybird browser to start using Swift language this fall

#10
post #7

============================== Andreas Kling @awesomekling · 44m My general thoughts on Rust: - Excellent for short-lived programs that transform input A to output B - Clunky for long-lived programs that maintain large complex object graphs - Really impressive ecosystem - Toxic community ==============================

He's not wrong.
Post reply on HN