Andreas Kling aka @awesomekling wrote:

We’ve been evaluating a number of C++ successor languages for @ladybirdbrowser , and the one best suited to our needs appears to be @SwiftLang 🪶

Over the last few months, I’ve asked a bunch of folks to pick some little part of our project and try rewriting it in the different languages we were evaluating. The feedback was very clear: everyone preferred Swift!

Why do we like Swift?

First off, Swift has both memory & data race safety (as of v6). It’s also a modern language with solid ergonomics.

Something that matters to us a lot is OO. Web specs & browser internals tend to be highly object-oriented, and life is easier when you can model specs closely in your code. Swift has first-class OO support, in many ways even nicer than C++.

The Swift team is also investing heavily in C++ interop, which means there’s a real path to incremental adoption, not just gigantic rewrites.

Strong ties to Apple?

Swift has historically been strongly tied to Apple and their platforms, but in the last year, there’s been a push for “swiftlang” to become more independent. (It’s now in a separate GitHub org, no longer in “apple”, for example).

Support for non-Apple platforms is also improving, as is the support for other, LSP-based development environments.

What happens next?

We aren’t able to start using it just yet, as the current release of Swift ships with a version of Clang that’s too old to grok our existing C++ codebase. But when Swift 6 comes out of beta this fall, we will begin using it!

No language is perfect, and there are a lot of things here that we don’t know yet. I’m not aware of anyone doing browser engine stuff in Swift before, so we’ll probably end up with feedback for the Swift team as well.

I’m super excited about this! We must steer Ladybird towards memory safety, and the first step is selecting a successor language that we can begin adopting very soon. 🤓🐞

32 points
*

Now THAT was unexpected.

permalink
report
reply
75 points

This seems like such a poor choice if you want a cross platform browser.

permalink
report
reply
-15 points

Probably to be a cross platform wide-adopted browser is not the goal, and the author hopes to find a niche userbase amongst conservative macOS users to feed his narcissism.

permalink
report
parent
reply
4 points
*

What?

I mean this sincerely, I’ve been loosely following this project and the OS it is from and would like to know more about what you know, because this is the first time I’ve heard such accusations.

permalink
report
parent
reply
0 points
*

It’s a reference to this: https://github.com/SerenityOS/serenity/pull/6814#issuecomment-830793992

They have a phobia of making changes that are valid if they perceive the change to be motivated by politics. In the example above, the PR is denied because they have been convinced that the PR is about accommodating trans people. The existence of trans people and accommodating them via grammar is political for certain kinds of conservatives. The irony is that their own political beliefs are affecting their ability to distinguish a valid change from a politically-motivated one.

permalink
report
parent
reply
6 points

I’ve worked with Swift a bunch for Apple platforms, am mildly familiar with how it works on other platforms. It should be able to compile on a wide host of platforms with minimal/no issues. The runtime dependencies are localized to Apple platforms, and I think the dominant UI toolkit on other platforms is a Swift port of qt. So it should be just fine?

permalink
report
parent
reply
26 points

Not necessarily. The language itself is implemented on LLVM and compiles to a variety of backends, and can interoperate with C and C++ (including presenting C++ classes and STL types in its type system). Toolchains exist for Windows and Linux, as well as Apple platforms, and porting them to other POSIX-like OSes shouldn’t be too hard. The core of the language and its Foundation runtime library are open-source and cross-platform; it’s only macOS/iOS APIs and higher-level frameworks built on them like SwiftUI which are proprietary. Swift is in use on non-Apple platforms: there’s the Kitura web framework, which gets deployed mostly on Linux, and someone has recently used it to write games for the PlayDate handheld console.

In general, I can’t fault his rationale there. Swift has more modern language features (such as an expressive type system) than Go, is not quite as fiddly as Rust, isn’t a trainwreck of incompatible levels of abstraction like C++, and has developer momentum behind it unlike Dart.

permalink
report
parent
reply
4 points

Reading that really makes me want to give it a go. If swift’s package management is anything like Rust or Go, I could see myself enjoying it

permalink
report
parent
reply
2 points

As of a few years ago, Swift has a package management system named, creatively enough, Swift Package Manager, which can install and build dependencies. It uses Git repository links rather than a central Cargo-style package database, though.

permalink
report
parent
reply
55 points

Hey Ladybird — get off Xitter and use something else like Mastadon.

permalink
report
reply
35 points

Weird fascist tech bro likes weird fascist tech bro platform

permalink
report
parent
reply
6 points
*

Weird fascist tech bro

What the hell are you talking about? I have been following Andreas for few years already and in no way he is fascist, in fact he is one of the most wholesome people around that I know of.

permalink
report
parent
reply
11 points
*

Your comment convinced me to finally take a look at his profile and see what the fuss is about.

I didn’t see anything that’d make me scream fascism, either.

But there’s definitely stuff that’s off. Things that, in isolation, would be one thing, but when you analyze them all together, it wouldn’t be weird to say there’s a pattern. A picture starts to form, and it’s one that I’ve sadly seen many times before.

So I went back and grabbed a few tweets:

I barely had to scroll to find these, they’re all recent. There’s much more.

Individually, you could dismiss everything. It’s just humor. He’s neutral. Objective. Wholesome. But then, why does he keep hitting the same keys? You’d assume a wholesome centrist would have a little more variety in their stand-up routine.

You know what he reminds me of, after reading so many of his tweets?

People who dress up in a veneer of positivity, but you ask them what they think is negative, and they’ll say things like raising awareness of LGBT issues. Not in those words, of course, because that’s not positive. When they talk about it, they’ll put on this show about how they don’t take sides, and how they’re simply worried about the technical discussion, the actually important stuff, you know? They simply don’t like unhelpful noise, things like trying to foster an inclusive community.

It’s easy to seem like a positive figure when you never properly acknowledge any criticism. Position yourself as a factual, neutral voice of objectivity, even when that’s literally impossible. Paint those who disagree as non-contributing, unproductive, negative noise-makers. Say you agree with people on topics they care about, but then turn around and tell them they’re all doing it wrong. Cover it all up in emoji and a “Let’s do it together!” attitude, but reject anyone who reaches out with the wrong greeting.

And there you have it, Andreas reads like a man who’s either lying to himself or to others, and I don’t know which is worse.

I went into this thinking, “I have to avoid baselessly criticizing people. There’s surely nuance to this man’s real beliefs, people on the internet are too quick to attack without evidence.” Which is why I’m honestly surprised to say that I came out with a mildly worse opinion of Andreas than when I started. What the hell.

I sincerely hope he can reflect on his behavior and grow out of this strange mindset. Andreas seems to be a great software developer and Ladybird can be an enormous boon for the web, so it hurts to see him acting this way.


Again, I genuinely don’t think he’s on Twitter because he’s a “weird fascist tech bro” who likes a fascist platform (what is even meant by weird?). I find it more probable that he’s comfortable there, realizes that it’s not going anywhere, that it remains the most popular platform, and therefore doesn’t think Mastodon is worth the effort.

Why he’s so comfortable there and doesn’t like Mastodon is worth thinking about, though.

permalink
report
parent
reply
13 points
*

For comparison, Mozilla is on Twitter as well, but they’re also on mastodon and even went as far as deciding to host their own instance.

permalink
report
parent
reply
20 points

Programming language: Swift - owned by big corp
Source forge: Github - owned by big corp
Communication channels:

  • Xitter - owned by big corp
  • Discord - proprietary and non-searchable

👌

Anti Commercial-AI license

permalink
report
parent
reply
0 points

They probably wanted to use Rust but got frustrated by its struct and impl paradigm.

permalink
report
reply
5 points

and the community not being transphobic

permalink
report
parent
reply
30 points

Swift was developed by a lot of former C++ committee members, and in C++ circles they’ve been advocating for it as a “successor language” for quite some time.

This could definitely be confusing if you don’t have that context, but making Swift useful for this kind of project has been an explicit goal of the Swift developers for years.

permalink
report
reply
5 points

How have they been advocating that? This is the first I’m hearing about any of this…

permalink
report
parent
reply
4 points
0 points

Is Swift really safe?

Anti Commercial-AI license

permalink
report
parent
reply
1 point

IDK, but D is probably a better “successor language” for C++ than Swift. The lack of corporate support is both a curse and a blessing: What it lacks in money makes up in no “hype-bust” cycles, thus we don’t have to jump on various bandwagons and programming trends can be easier written off as just trends (e.g. we dodged a bullet by never going through a “const by default” suggestion).

permalink
report
parent
reply
1 point

I have wanted to like D for so long but it has just not been able to create a cohesive story outside its own bubble. It feels like it is going nowhere. Certainly, given its ages, there is no obvious path to popularity.

permalink
report
parent
reply

Programming

!programming@programming.dev

Create post

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person’s post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you’re posting long videos try to add in some form of tldr for those who don’t want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



Community stats

  • 3.7K

    Monthly active users

  • 1.8K

    Posts

  • 29K

    Comments