8 ms·
Ladybird is going to use Swift.
by binary132 8mo ago
Ladybird is going to use Swift.
- torginus 8mo agoIf I remember correctly, the guy behind it used to work at Apple, maybe that has to do something with it?
- binary132 8mo agoperhaps they do not think Rust is the best option for Ladybird
- boxed 8mo agoThat is very good news! I've used Swift a bunch for hobby projects, and the two things that suck about it are: 1. XCode 2. Compile times I would assume if you're coming from C++ or Rust the compile time issues aren't really something you notice anyway :P
- quux 8mo agoYou don't strictly have to use Xcode to use swift, there's a good LSP for use in other editors. That said, if you're using Swift to build an app, you're probably still going to want to use Xcode for building and debugging
- p-e-w 8mo agoI know that that’s the plan, but I believe it when I see it. Mozilla invented entire language features for Rust based on Servo’s needs. It’s doubtful whether a language like Swift, which is used mostly for high-level UI code, has what it takes to serve as the foundation of a browser engine.
- binary132 8mo agowhat technical demerits specifically make Swift a doubtfully viable option for a browser?
- no_wizard 8mo agoSwifts most notable use case is certainly making apps but if I recall correctly Apple has converted a good bit of their networking code to Swift. It may not be the lowest of the low level but it certainly is more flexible than meets the eye
- DanOpcode 8mo agoI know they have said that. But it feels a bit strange to me to continue to develop in C++ then, if they eventually will have to rewrite everything in Swift. Wouldn't it be better to switch language sooner rather than later in that case? Or maybe it doesn't have to take so much time to do a rewrite if an AI does it. But then I also wonder why not do it now, rather than wait.
- quux 8mo agoThat is the plan, but they are stalled on that effort by difficulties getting Swift's memory model (reference counting) to play nice with Ladybird's (garbage collection) I think there was some work with the Swift team at Apple to fix this but there haven't been any updates in months
- binary132 8mo agoI would love it if you would provide a reference I could go look at
- quux 8mo agoThere's a few threads about this in the Swift forums, here's a couple: https://forums.swift.org/t/ladybird-browser-and-swift-garbage-collection/76084 https://forums.swift.org/t/ladybird-browser-and-swift-garbag... https://forums.swift.org/t/ladybird-browser-event-loop-integration-with-swift-concurrency/78453 https://forums.swift.org/t/ladybird-browser-event-loop-integ... https://forums.swift.org/t/ladybird-gc-and-imported-class-hierarchies/78790 https://forums.swift.org/t/ladybird-gc-and-imported-class-hi...
- binary132 8mo agoThank you! I look forward to perusing these.