5 ms·
> This idea that for Swift to thrive as a server language it has to win some contest against Go and Rust makes absolutely no sense to me. That's not the point!
by echelon 7y ago
> This idea that for Swift to thrive as a server language it has to win some contest against Go and Rust makes absolutely no sense to me.
That's not the point! It's that engineers have to use Mac machines to develop Swift because they're tied to a development platform. Go and Rust (simply called out as nearest neighbors) do not have this limitation. Even Microsoft has made great progress in making their tools available on other platforms.
It would be foolish to choose Swift for this reason. You're tied to Mac machines until it's been proven other platforms will have full support. It's a real handicap for Swift as a language and platform for anything beyond writing Apple software.
- Razengan 7y ago> It's that engineers have to use Mac machines to develop Swift That is patently untrue.
- Tainnor 7y agoAs it's written, this is untrue. You don't need a Mac to develop Swift. However, you really ought to have one, because the development experience is subpar on Linux: - there is no free IDE (XCode is only for macOS, and CLion costs money - plus, it has its own bugs) - a lot of tips and tricks on the internet (e.g. about profiling your application, etc.) heavily rely on XCode. Actually, even Apple's own documentation usually references XCode settings (or other apple tools) instead of exposing a good cross-platform interface - the code just behaves differently on Linux than it does on the Mac (especially with Foundation)
- scarface74 7y agoThis is server side Swift. It supports the LSP and is supported by Visual Studio Code.
- Tainnor 7y agoApart from the fact that you ignored the other two arguments I made, the LSP is not production ready. It even says so on its very own github page: https://github.com/apple/sourcekit-lsp#status https://github.com/apple/sourcekit-lsp#status
- scarface74 7y agoThe XCode profiling is mostly for iOS apps - not server side code. You wouldn’t really be better off using a Mac for profiling server side code. And what server side code “behaves differently” Where does it say it’s not “production ready” on the GitHub link?
- badrequest 7y agoYour response to "there's no good tools for profiling Swift apps on Linux" is "you only want to do that for iOS apps anyway?" I profile server code all the time, it's simply unacceptable to think I'd ever use a language that didn't facilitate it. Go does (https://blog.golang.org/profiling-go-programs https://blog.golang.org/profiling-go-programs). I've not used Rust, so I can't speak to that.
- scarface74 7y agoYou mentioned specific profiling in XCode and how that makes it necessary for server development. XCode doesn’t have much of any profiling that would be beneficial to server development - the entire topic of the submission.
- Eric_WVGG 7y ago> And what server side code “behaves differently” [mean] Spend a bit of time on the Vapor Discord channel and read about all the quirks Linux users have to deal with that the rest of us don’t. (My impression is that it’s due to Foundation libs.)
- scarface74 7y agoSo instead of a specific example you want us to go to a random discourse channel?
- pjmlp 7y agoOn Ubuntu...
- wlesieutre 7y agoThe language server runs on linux and works with VS Code. Is there something in particular you're missing? You don't have XCode on linux, but I've never heard of someone being disappointed about that. And does Apple have to be the source of all tooling? Is that how it is for Rust and Go? It's certainly not for Javascript and Python tools.
- Tainnor 7y agoI can't even get sourcekit-lsp running without errors. "failed to create SwiftPMWorkspace: could not find executable for 'xcrun'" Until such time as there is a working installer that is as simple as "download XCode from the app store", I don't really consider that to be an alternative. I certainly can't recommend it to anyone on my team.
- mickael 7y agoYou can use VS Code + remote & Docker: https://medium.com/@ianpartridge/swift-development-in-docker-using-visual-studio-code-remote-b84d035e70db https://medium.com/@ianpartridge/swift-development-in-docker...
- duregin 7y ago>It would be foolish to choose Swift for this reason. There are plenty of $technology shops out there. It's trivial for a company to standardize on Apple hardware only. In fact, from the point of IT management, it makes everything easier, and when IT is easy, everyone benefits. So I'm not sure if "foolish" is a correct assesment here.