Hacker Newsnew | past | comments | ask | show | jobs | submit | Rimtariro's commentslogin

I feel like Swift is a big miss from Google/Microsoft. If they supported Swift on their systems (properly supported), they would immediately open up their platforms to lots of Swift developers, and I think the benefit would be more than they would need to invest into supporting Swift.


Swift developers are not that many. It's less than 5% of respondents to the Stack Overflow developer survey [1].

Microsoft and Google each have languages/ecosystems with larger developer share (Google at over 6% for Dart, and Microsoft at over 27% for C#).

[1] https://survey.stackoverflow.co/2023/#technology-most-popula...


Kotlin is at 9% and Java developers, at 30% here, could easily switch over.


It's not a zero-sum game, they don't have to reduce support for other languages. It would be a completely new source of developers for these platforms. Better 1% than 0%, and I would say that effort for that would not outweigh the possible benefits and income from new devs/apps.


It's not Microsoft and Google's job to write Apple's software for them. It's like complaining that Apple doesn't write a good Dotnet runtime; of course they don't. It's not their job, and they don't want to anyways.

> It would be a completely new source of developers for these platforms.

I have no idea who you're referring to here. Who are the developers that are locked-in to iOS/MacOS but would consider ChromeOS or Windows if it supported Swift better? I cannot think of a single person I know that fills that bill. If anything it's the other way around, where people end up switching away because they don't have any use for Swift/AppleScript.


less than 5% vs. over 6% is not that big of a difference


Is that survey actually scientific? I have been doing Ruby and Swift for years and never completed that survey. That survey is of reasonably active users to Stack Overflow — there is a selection bias. There isn’t a lot of great Swift content on SO, so that’s going to attract fewer developers to answer the survey.


Apple not supporting kotlin/java/c# is a big miss by that logic. Those languages are far larger in market share than swift.


Those languages are already well supported on Apple platforms from the language makers themselves, there is not much Apple can do to "support them" better.

Opposite is not true though, there are lots of troubles you have to go through to have Swift on Android/Windows.

Very often, especially in startups, when the new app is created, it is first created for iOS and then for Android. Having proper Swift support would reduce effort for bringing apps to Android/Windows.


We've had Kotlin Multiplatform for a while now, so a developer writing an Android app in Kotlin could bring it over to iOS and desktop platforms today with reduced effort. Compose Multiplatform aims to take this a step further by allowing UI code sharing instead of just business logic.

The future is not that far off where you can write a 100% native Android app and, minus any Android OS-specific functionality, port it over as-is to iOS and desktop.


So how's that not a big miss from Apple to support Swift on other platforms and open themselves to have more developers supporting theirs?


"open themselves to have more developers supporting theirs?" -- Thats exactly what is missing from Google/Microsoft. Apple is already supporting Swift on other platforms, however, developer experience is not as good as on macOS and I don't think that can/will be solved by Apple. It is exactly where other players missing out, by making their dev experience as good or better, they could help developers write apps for their platforms.


> Apple is already supporting Swift on other platforms, however, developer experience is not as good as on macOS and I don't think that can/will be solved by Apple

Yes it can. It's just Apple can't be bothered - most of the work to do that doesn't benefit Apple - it does benefit the Swift ecosystem and community of devs, but not Apple - the venn diagram of Apple vs the Swift dev community overlaps but doesn't completely close.

Swift came out in 2014 - Windows support for the compiler came out in 2020. That's it. They haven't bothered to upgrade the tooling support in VSCode or any other app because most VSCode users aren't Apple devs. The ball is literally in Apple's court - no one elses.


.net and kotlin work on Mac. Why would MS or Google subjugate themselves to an ecosystem driven by Apple?

Plus, honestly, moving from swift to kotlin or even dotnet is marginal. The problem is getting into the qwirks of the underlying frameworks like swiftui, the ios sdk, the android sdk, and the conventions of these platforms. Language itself is relatively marginal in that. So really I don't see the value in what you're claiming.


Somehow it's never Apple's fault.

Apple doesn't really care about Swift outside their wallet garden. How dare other companies refrain from investing in such a wonderful creation!


If anything they care about keeping it inside their wall. Just think, if Swift apps were a button click away from running on Android. Suddenly the best iOS apps become multi platform at no additional effort, dependence on Apple becomes a little less.


It's not about Apple. Google/MS would invest for their own sake, so that it would translate into more apps (earlier, not as a second class citizen) on their platform, which in the end would bring money as well.


The math is not that simple.

Investing in Swift would to an extent canibalize Go, Dart/Flutter, TypeScript, C#. You know, the technologies which have creators that actually care and invest billions in cross-platform development.

Not to mention fragmentation.

Apple doesn't even care about Linux running in their own hardware. Their contribution towards that goal ranges from hostile to scraps, depending on who you ask.


Don't make it sound like a zero-sum game, because it is not. They don't have to drop any of the support they provide for other languages right now.

In fact, they don't even have to do that much for Swift. They don't have to develop neither the language nor the compiler.

They need to do similar to what The Browser Company did, exposing and allowing usage of their APIs from Swift, and maintain it as their API evolves.

If The Browser Company could afford it, while developing the browser, Google and Microsoft can afford it as well.


For an Apple\Google owned ecosystem it is. If leaving the walled garden is a button click away, what app would be Apple or Google exclusive? Suddenly an iPhone Owner's favorite apps are on the other platform too, so when upgrade time rolls around why buy an iPhone (and vice versa for Android)?

Commoditizing your own product is never in a company's best interest so don't expect it to happen willingly.


> If The Browser Company could afford it, while developing the browser, Google and Microsoft can afford it as well.

If The Browser Company could afford it, 3 trillion USD market cap Apple can afford it as well.


> Very often, especially in startups, when the new app is created, it is first created for iOS and then for Android. Having proper Swift support would reduce effort for bringing apps to Android/Windows.

I mean, this is just absurd logic. How is the lack of Swift support on non-Apple platforms somehow up to Google or Microsoft? The burden to support more platforms is on the language developer, not the platform dev.


There are very few “Swift developers” out there. Much more common are “iOS developers who write in Swift”.

I wouldn’t assume that any iOS engineer would be jumping all over the opportunity to make Android or Windows apps just because they can do it with Swift. They have their (typically pretty lucrative!) niche and are happy living in it.


They don't have to jump though, many iOS developers also do watchOS/macOS apps but they are still "iOS developers". If they can bring one more platform under their belt with little effort, I would say that many of them would consider it.


watch/mac/iOS are all the same platform just with a different window manager.


Not really, but it is easier to think that way.


At this point how do they differ?


Different toolkits and interaction models.

AppKit is still dominant on macOS (despite the addition of Catalyst), UIKit is the chief framework on iOS/iPadOS/tvOS/visionOS, SwiftUI is native on watchOS and mostly wraps AppKit/UIKit on the other platforms. macOS is oriented around KB+mouse usage, iOS/iPadOS/watchOS are touch-dominant, tvOS is made to be remote-friendly, and visionOS is oriented around eye navigation and hand gestures.


macOS is far more complex and flexible than the iOS family of OSes (which are really all just iOS, including iPadOS).

Apple claimed they were running OSX back at the iPhone launch, but it was truly very stripped down to accommodate the underpowered hardware, and they've only made incremental, very targeted expansions in the last 16 years.


In order to properly support it, Microsoft and Google would need to have a level of control over the language that Apple will never yield to them.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: