by hocuspocus · 1y ago · 0 comments
Re: easy to write, I'm not sure, Swift's recent explosion in complexity makes it a hard sell vs Rust, even if the learning curve might be slightly less steep. At the end of the day, Rust's DX wins in almost every dimension, people are willing to learn slightly more complex semantics if it saves times everywhere else: tooling, libraries, build tool and package manager, ... I believe even compilation speeds don't compare favorably.
Swift solves a problem that is still there. It was also released before the final release of Rust.
It’s just that people seem to think that because it’s from Apple, it’s only meant for iOS/macOS.
I love swift, it combines so many things, and Apple is really good get pushing the language forward with its compilers/warnings.
I’m also using it for shell scripts and small utils, and it’s really great. I made https://github.com/jrz/container-shell to improve the experience of scripting cli tools in Swift.
So; what exactly are Apple's big, selfless contributions? XNU is Source Availible but unusable without buying proprietary Apple hardware. iBoot is mysterious and has to be reverse-engineered to use it like UEFI. Open standards like Vulkan are ignored for political reasons, CUPS is basically derelict, WebKit killed KHTML because sharing was too hard, and APFS and Metal are still both undocumented despite promised transparency. CoreML is proprietary but can't compete with CUDA, iPads can't use QEMU despite supporting it in-hardware, all the Apple Silicon DeviceTree code is private, competing runtimes like Corellium get sued and security researchers get ignored. Swift, as an offering to the Open Source community, is a punch line at the end of a 20 year long gag.
Apple does genuinely nothing to advance the wellbeing of common computing for mankind. Apple leaves behind no charitable contributions to anything that does not ensure their absolute preservation as a business. Combined with the proven anticompetitive damages that the App Store incurs on the burgeoning mobile market, they are unequivocally a net-negative force and aren't hated enough for their parasitic influence on global software production.
I think I can handle their stance on software,
Cause like... we could start judging companies based on how many carbon credits they buy. But that wouldn't make Microsoft or Apple or Google any less evil, so it's a non-sequitur. Apple can simultaneously mass-produce the most desirable hardware in the world while creating anticompetitive market conditions that debilitates fair choice and destroys legitimate value. The United States threatened to break up Microsoft for the same overreach.
When Android was first released it was basically Android devices only, too. Still is.
It works well on Windows, macOS, iOS, Android and I suspect Linux as well (but I never use Linux, hence I can't be sure). And if you want a multiplatform UI there's some decent options like Avalonia UI [0].
---
That being said. Microsoft does not want a cross-platform C# that works on Linux. This is why their .NET MAUI does not support Linux and a 3rd party framework will be needed.
Only reason I would choose C# for non-Windows is because of existing / legacy code base. Any new application would use language and libraries that fit the problem versus trying to fit C# as the solution to all.
Mono actually is the primary project that greatly improved the C# world and evolved the latest .NET infrastructure, not Microsoft. Mono developers actually cleaner APIs. Even Microsoft Visual Studio for Mac is just Mono Developer with the Linux supporting bits removed.
If you're developing Windows apps or Windows games, C# is a fine choice; much as Swift is a fine choice for Apple apps. But no one worried about Apple's control of Swift should be pointing people to C# with a straight face.
This routinely pulls the carpet under the .NET team effort to widespread .NET adoption.
Unlike Swift, there was never a period of time where LLVM only worked exclusively on Apples own OS's or hardware. From the get go, you could run early versions of LLVM on Windows. In Swift's case, Linux support came in 2016, 1.5 years after Swift's initial release in 2014, then Windows support came 6 years later in v5 (2020).
If Apple didn't want to let Swift suffer the reputation of being an Apple-only language they should've invested more into cross platform support much earlier on. Yes, today Apple and everyone else can say, 'Swift is cross-platform', but dig deeper into the history of Swift and its clear that from the get go, Apple treated non-Apple OS support as an afterthought.