4 ms·
One way that Swift is certainly not more convenient than Rust is the tooling. I use a 2018 MacBook Air, using macOS 12, which is now unsupported by Xcode. Meanw
by robjwells 2y ago
One way that Swift is certainly not more convenient than Rust is the tooling. I use a 2018 MacBook Air, using macOS 12, which is now unsupported by Xcode. Meanwhile SourceKit-LSP is treated as very much a second-class citizen. But Rust 1.81 and rust-analyzer build and run just fine.
- arghwhat 2y agoNot to praise Swift, but Swift and Xcode are unrelated projects. Saying that Swift is inconvenient because of Xcode issues is like saying C++/C# is inconvenient because of Visual Studio. 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.
- yunohn 2y agoI’m pretty sure you need Xcode to compile Swift on macOS.
- acar_rag 2y agoAbsolutely not, you just need to use swiftc: https://theswiftdev.com/the-swift-compiler-for-beginners/ https://theswiftdev.com/the-swift-compiler-for-beginners/
- robjwells 2y agoYou can install a Swift toolchain on macOS without Xcode, but Xcode is the “blessed” route and listed first on the swift.org getting started instructions. https://www.swift.org/install/macos https://www.swift.org/install/macos 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/4396 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.
- latexr 2y agoEveryone who has installed Homebrew has the official CLI Developer Tools (Homebrew installs them for you), and everyone who has those has a way to compile Swift. 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).
- x3ro 2y agoThe defacto standard matters. The vast majority of Swift programmers will be using Xcode, and I definitely immediately think of the pains I've had with Xcode when I hear Swift. For example, I don't know of any other good IDE environment for Swift, though maybe there is one. 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).
- arghwhat 2y agoYou don't use Xcode to write Swift, you use Xcode to write Apple apps which you happen to do in Swift. No matter the language, you need Xcode to write those apps. 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).
- eptcyka 2y agoIf you argue about nomenclature, yes, Xcode and cargo fit into entirely different categories. However, they are still comparable you can't feasibly escape either to develop Swift or Rust apps the way most people develop them.
- nelup20 2y agoYep, I've only started using Swift a couple of months ago, but Xcode just isn't pleasant to use imo (though I'm probably spoiled by Jetbrains' IDEs), and the Swift extension for VS Code is clunky. 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.
- mrtksn 2y ago[flagged]
- _mlbt 2y agoIt looks like MacOS Sonoma (and the latest Xcode) should work on your Mac. https://support.apple.com/en-us/105113 https://support.apple.com/en-us/105113