TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ladybird browser to start using Swift language this fall

200 pointsby nopakos9 months ago

23 comments

enragedcacti9 months ago
I&#x27;m seeing a lot of doom and gloom about this mostly stemming from the state of open source swift, but I think the choice has a lot of upside for two main reasons:<p>1) Choosing Swift implicitly adds improving the status quo of open source swift to the tasks of ladybird. This obviously expands the already huge scope of the project but also derisks it in some ways because it means the project can have a lasting impact regardless of its goals as a competitive browser. Remember that Rust was tempered as a language through the development of Servo and Ladybird could do the same for the non-Apple Swift ecosystem.<p>2) It unlocks access to a huge number of Swift developers and offers them a unique open source project to work on rather than just building apps for Apple products. As far as I am aware there is no other major language with such a massive (size of developer base):(open source opportunities) ratio. Ladybird acting as the cornerstone of that community could have mutually beneficial results that improve the development of ladybird while also fostering excitement for open source, non-Apple Swift projects.<p>Ladybird is a wildly ambitious project. We have N=3(ish) for how long it takes to develop a competitive browser from scratch in C++ even with the support of massive companies behind you and it isn&#x27;t very fast. Obviously we know it works but Ladybird is on mile 100 of a bicycle race around the globe that started 30 years ago. Staying the course on C++ to me looks like saying &quot;We&#x27;re already so far behind, we can&#x27;t afford to stop and add an electric motor!&quot; meanwhile everyone else is still pedaling and you aren&#x27;t getting any closer.
Decabytes9 months ago
I totally get using Swift in this context considering their heavy emphasis on C++. From my personal experience, Swift still feels like the early days of Open source .NET&#x2F;Mono. You will definitely experience the growing pains of being an early adopter of the language. The fact that JetBrains killed AppCode in Dec of 2022 7 years after Swift went Open Source is telling to me that getting the traction outside of the Apple ecosystem is not there. The vast majority of the people I see developing open source Swift apps still use Xcode and a Mac. For example Miguel De Icaza is a huge proponent of open source Swift, and is doing a lot of cool things with Swift Godot. But he develops on a Mac just like everyone else. The experience with VScode is just okay.<p>I think that the cross platform story both in terms of developer libraries, experience, and tooling is still much better on .NET, and provides a happy middle ground between something like Swift and Java. With that beings said I hate the options for Mobile&#x2F;GUI with .NET (MAUI, or AvaloniaUI), and would recommend Java&#x2F;Kotlin if you want to do that. I want to give a special shout out to F# as I feel like it is the most sensible functional programming language I&#x27;ve ever used, and is a lot less verbose then C#. The only knock against it I have is that it&#x27;s a smaller community than C# and most of the libraries you use will be written in C# so you need to know a little C# as well to be effective
评论 #41209398 未加载
评论 #41209431 未加载
stephen_g9 months ago
I had suspected this would happen, I haven’t got into Swift yet (I’m mostly doing embedded C still) but Swift finally seems to have just ticked off some niggles that makes it a much stronger contender. Things like not having official Debian builds (there were Ubuntu etc.), not being able to run under other C libraries like musl (like if you want to run in Alpine Linux containers), not really being able to run embedded etc. basically all being fixed in the last release (or starting the process, like with the embedded subset). Add in the newish C++ interop and it does seem much more attractive now as a pin ergonomic, memory safe, cross-platform language at all levels of the stack!<p>(This is of course by design, Apple intend to use Swift from everything from firmware of things like the Secure Enclave chip, through to the kernel, through to all the apps, but to be able to bring it in gradually with the interop, so not having to rewrite everything from scratch).
评论 #41209294 未加载
christophilus9 months ago
For those who are worried, Andreas is a thoughtful dude. This decision was not made on a whim.<p>Also, they’re not doing a massive rewrite:<p>&gt; The Swift team is also investing heavily in C++ interop, which means there&#x27;s a real path to incremental adoption, not just gigantic rewrites.<p>To me, the Tweet does a good job justifying the decision. I’m rooting for Ladybird, and I hope this decision pays off. A modern browser in a modern language sounds like a dream come true.
评论 #41209607 未加载
评论 #41209528 未加载
blinkingled9 months ago
Seems premature. You don&#x27;t write successful browser engines using relatively new language that is optimized for one platform.<p>But it was predictable - Andreas comes from Apple background so.. The other thing is no one can build a browser alone - the ability to attract the right people is what differentiates a mainstream usable browser and a toy one. IOW focusing on adding another language that is not as popular amongst the right developer demographic seems like the wrong thing to focus on at this stage.
losvedir9 months ago
Wow! This is awesome news. Swift is like the perfect language to me - kind of a Rust (whose type system I adore) but with garbage collection. I&#x27;d always thought it was a little too tied to the Apple ecosystem, and specifically iOS, but if they can make this work for a cross-platform browser, then I&#x27;ll have to give it another look. Maybe things have changed recently.<p>Oooh, or maybe I can even contribute now! I&#x27;ve supported Kling via GitHub for a while now and have been stoked about his pivot to building a browser. I never really dreamed of contributing, given C++, but now it feels more achievable.
lawn9 months ago
&gt; Support for non-Apple platforms is also improving, as is the support for other, LSP-based development environments.<p>Improving, as in ready now or still far in the future?<p>What does the current state of Swift look like for Linux and Windows? And how well does the LSP server function today?
评论 #41209119 未加载
评论 #41209170 未加载
zelphirkalt9 months ago
Hm. Not sure, if this is really a wise choice. After all they are choosing to use an Apple controlled programming language. Whatever direction Apple wants to go in, they will face themselves with following or working around. As an example we can look at Go and the whole GOPROXY debacle. And they will also have to deal with Apple not going into a direction, if they need that direction. Might have to build more stuff themselves, than with a language that is basically community owned. What if the Swift compiler starts doing things they don&#x27;t like? They just going to be stuck at an obsolete version then? Or fork the language?
评论 #41215389 未加载
peppermint_gum9 months ago
One thing I don&#x27;t understand about Swift is why it uses a private fork of LLVM. Why can&#x27;t they upstream whatever changes they need?
评论 #41208998 未加载
评论 #41209154 未加载
评论 #41209128 未加载
评论 #41209075 未加载
评论 #41209066 未加载
ksec9 months ago
I am just worried.<p>I just wish they could at least delay it until Swift 6.1, giving time for it to mature. And let the idea to jump right into Swift after 6.0 to age a little more.<p>Developers have a tendency to jump to new language, new tools, new problems because it is exciting and fun.
neonsunset9 months ago
It is unfortunate that Ladybird did not choose C#, being another high-level-adjacent C family language with strong systems programming capabilities crucial in browser development.<p>It has smaller AOT binary size, faster application code performance and much bigger ecosystem of GUI libraries and native GUI library bindings (everything you have in C and C++ you pretty much have in C#) which can be used with very low overhead. Not to mention better cross-platform tools and build system.<p>With that said, I do like and respect Swift, and am curious to see what Ladybird team will do with it.
评论 #41209242 未加载
pelagicAustral9 months ago
I did wondered how long would it take for a Rust zealot to take over this thread, it is already ongoing...<p>That being said, this is a rather odd decision. Why would you go so much out of your way to add yet another compiling stage, yet another language that, far as I can tell, is not getting much traction in this space?
nu11ptr9 months ago
This is interesting. I evaluated Swift, but it didn&#x27;t feel like platforms outside of Apple were first class. If this is changing, it would be a good thing.
dvektor9 months ago
I am a bit surprised at this, considering the lack of non-apple ecosystem but I guess when you build everything yourself completely from scratch, you may not care as much about libraries and ecosystem.
throwaway11949 months ago
I don&#x27;t know how and why people still take this guy seriously, let alone throw money at his projects.<p>Andreas has demonstrated time and time again that he can&#x27;t keep his word. He says one thing and does things differently.<p>That wouldn&#x27;t be too much of a problem if he didn&#x27;t accuse others of what he is guilty of, toxicity.<p>He is also known for bashing other projects to promote his own. I would go help Servo instead. Ladybird isn&#x27;t going anywhere, same as SerenityOS.
BaculumMeumEst9 months ago
What happened to jakt?
评论 #41209449 未加载
评论 #41209653 未加载
评论 #41209394 未加载
tasty_freeze9 months ago
I know Andreas is a prolific coder, but this seems weird to have a pretty functional (but far from complete) browser written in C++ and then casually say, eh, &quot;We are going to rewrite it in another language&quot; in the same way one might say &quot;We&#x27;ve decided to change the branding logo&quot;?<p>I know that is a run-on sentence, but I need to get my exercise.
评论 #41209388 未加载
评论 #41209552 未加载
评论 #41209556 未加载
评论 #41209415 未加载
frankjr9 months ago
Does anybody know if the upcoming version resolves the compilation time issues?<p><a href="https:&#x2F;&#x2F;danielchasehooper.com&#x2F;posts&#x2F;why-swift-is-slow" rel="nofollow">https:&#x2F;&#x2F;danielchasehooper.com&#x2F;posts&#x2F;why-swift-is-slow</a>
diimdeep9 months ago
There you go, we have immature industry if Rust or Swift is only logical choice to substitute C++, maybe working on a better language would be such a bad idea after all, meanwhile still long on Jai.
评论 #41215357 未加载
Thaxll9 months ago
Using Swift outside of Apple ecosystem seems like a bad idea, other platform are subparts.
评论 #41209428 未加载
Affric9 months ago
==============================<p>Andreas Kling @awesomekling · 44m<p>My general thoughts on Rust:<p>- Excellent for short-lived programs that transform input A to output B<p>- Clunky for long-lived programs that maintain large complex object graphs<p>- Really impressive ecosystem<p>- Toxic community<p>==============================
评论 #41209532 未加载
评论 #41209345 未加载
评论 #41209210 未加载
评论 #41209298 未加载
评论 #41209457 未加载
评论 #41209402 未加载
评论 #41209233 未加载
评论 #41209378 未加载
评论 #41209292 未加载
评论 #41209110 未加载
评论 #41209512 未加载
评论 #41209401 未加载
评论 #41209815 未加载
评论 #41209090 未加载
stephc_int139 months ago
I think this kind of reckless move is likely to be very costly and could even jeopardize the success of this project.<p>I would say the same thing with any languages switch, except C and C++ as they tend to mix well and coders are usually familiar with both.<p>But Swift is, in my opinion, the worst possible choice. It is known to be a mess, even criticized by its original maker.<p>The compilation times are horrendous and nobody in the team is a Swift expert.<p>When making large architecture decisions on such a complex and difficult project, the people in charge should use all their mental energy on that task, not exploring new idioms or styles.<p>The only valid explanation that I can think of is that they are being funded to promote Swift.
rvz9 months ago
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.<p>The browser story is not great for Rust as we can only point to Servo which isn&#x27;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.<p>Other than iOS apps, perhaps Swift found another use-case in large C++ code bases thanks to the C++ interop story.
评论 #41209076 未加载
评论 #41209093 未加载
评论 #41209113 未加载
评论 #41209047 未加载