You can install Swift on Linux if you want and code away, just like with Rust - but as it hasn't really caught on for anything other than building apps for the Apple ecosystem, it's not a particularly normal thing to do.
You could also argue that e.g. Rust is not cargo, but almost every Rust programmer will be using cargo. Sure I could use something else, but why would I? Of course the analogy is not perfect, because the "why would I?" is clear for Xcode: it's bad and macOS only :D
All I'm trying to say is: defaults matter. Most people will not be writing Swift in VS Code (on macOS).
I'm still really sad Jetbrains decided to sunset AppCode :(
So the quality of tooling/IDEs is definitely a factor, I just don't see myself using Swift outside of the Apple ecosystem when there are so many other alternatives.
Equalling Xcode and Cargo makes no sense. A similar situation to Xcode and Swift would be like Visual Studio and C# on Windows. Many developers use these tools, but they are not the language ecosystem, and the Cargo equivalents are entirely separate (Nuget, Cocoapods).
However, it can be a bumpy ride. For example: “swift test” (via the CLI) doesn’t work if Xcode is not installed. https://github.com/swiftlang/swift-package-manager/issues/43...
I would just emphasise that the OP was about _convenience_ and Swift-without-Xcode on macOS is not smooth sailing.
Even if you don’t have Homebrew, the first time you try to run `swift` in a Terminal you’ll get a GUI prompt which lets you install the Developer Tools in two clicks.
Or you can run `xcode-select --install` (comes preinstalled, no Xcode needed).
Yes, pretty much
But for those of us who use a computer every day, surely it makes sense to stay a bit cutting edge and it won't break the bank either since it is literally our income.
Anyway, you sel the old machine and get the new one is pretty normal as the Apple devices tend to hold value.
It's not really sustainable to throw buy new stuff all the time when there's not a technical reason for it
6 years is a lot. It runs about 14$ a month if you throw away you tool at the end. It's probably more like 10$ since you are likely to be able to sell that tool at reasonable price since its Apple.
How is it that buying the new tool to do the new thing is unreasonable and expecting the old tool to do the new thing is reasonable?
IMHO if the new tools are good and the tool you have is not good it doesn't mean that the tooling is bad, it means that the tool you have is bad and the solution for this is to obtain a new tool.
The new tooling is amazing, its fast its snappy it runs the code you write for you mobile device directly on your tool. If that brings you value less that is less than 200$ a year, then it can be a bad deal but its not bad tooling.