5 ms·
hope this works out! i really wanna work with swift outside xcode, i want it in vim
by songbird23 2y ago
hope this works out! i really wanna work with swift outside xcode, i want it in vim
- acedTrex 2y agothey showed swift in neovim in the keynote when they talked about LSP support
- mdhb 2y agoI got to be honest every time I look over to the Swift/iOS development ecosystem I’m shocked at the amount of nonsense they have to deal with. - Xcode is terrible - Documentation is barely existent - you can’t really reuse your code in any other context - you have to pay them money to even release your software - they steal 30% of your revenue - they reserve the right to shut you down at any point, for any reason and provide almost zero recourse. I get why people had to use it historically but it seems like a really bad choice to try and build any kind of reliable future on top of in 2024.
- jshen 2y agoWhat does this have to do with swift?
- MBCook 2y ago> Documentation is barely existent Depends on the thing. And there is a large community with examples online, which helps. > you can’t really reuse your code in any other context Not everyone cares. If I’m only targeting an iOS app the fact the code doesn’t run on Android or Windows isn’t a problem for me. > you have to pay them money to even release your software On Apple’s App Store, sure. Or if you want your stuff signed. If you want to release open source or don’t mind shipping unsigned stuff it’s free free free. > they steal 30% of your revenue > they reserve the right to shut you down at any point, for any reason and provide almost zero recourse. Only if you’re in their App Store or want your stuff signed. > I get why people had to use it historically but it seems like a really bad choice to try and build any kind of reliable future on top of in 2024. The bargain is the same as it ever was. I’m OK with it. I made stuff in Xcode for my Mac just for me for a long time without hassle or paying a cent. The costs only cost if you want to distribute pre-built binaries to others.
- cageface 2y agoShipping unsigned stuff is not commercially viable. Very few users even know how to get around gatekeeper and even fewer are willing to do it to run your app.
- MBCook 2y agoI agree. But if you’re not developing commercially maybe that doesn’t matter to you. If it does it’s $100 bucks a year, no matter how many things you develop and how many users you have. That doesn’t seem too bad to me.
- talldayo 2y ago> That doesn’t seem too bad to me. Avid denialists like you make me glad antitrust works. It is in fact "bad" to create an artificial pipeline of demand and then manipulate the pressure by excluding profitable competition. You might argue you're entitled to that pipeline if you own it, but that doesn't protect you if you use it for anticompetitive purposes. Microsoft found this out a while ago, when they were threatened with a breakup if they further abused their monopoly position. Apple spent 10 long years refusing to renegotiate their asinine, arbitrary rules until the government stepped in. In that time, an uncountable amount of market damage has been caused by Apple's protectionist policy and can't be ignored simply because it works for some people. Apple is in the wrong, and they know it; that's why they're accepting their fate instead of fighting for their right to continue abusing their App Store privileges forever.
- j1elo 2y ago> On Apple’s App Store, sure. Or if you want your stuff signed. > Only if you’re in their App Store or want your stuff signed. I'd buy that one if installing something from outside Apple's App Store was just like in Windows, downloading an installer package and running it (which AFAIK it is for Mac, but not for iOS). And similarly to the signed stuff: not sure about modern Windows as I ran away from it a while ago, but last time I used it (Win 7) if the installer wasn't signed you could just install it anyway with a single click. Say those two things aren't capped on iOS or Mac, then yes, your rebuttal is valid. But if "you" (Apple) change the rules of the game of how traditional installers have always worked, over the years making those two things de facto mandatory, then later you cannot claim in your right mind "hey but if you want to make your software impractical to use, you're free to do so!"
- pudwallabee 2y agoThe tooling(?) (starting with xcode) is quite objectionable and is enough to drive people (me) away. The language choices are well. Interesting. Kotlin fills the need for mainstream Swift better than Swift, and without all the baggage that Apple brings to the table. If you want to see what open source Swift is going to end up like, just look at GNU objective C. It will likely follow the same pattern of adoption over time and be hobbled on non-Apple platforms.
- frizlab 2y agoThere is an official support for Swift in VSCode and articles pending in the website PRs for setting up Swift in eMacs and neovim.
- cageface 2y agoIt’s not a great choice to build a reliable software business in 2024 but most of the other choices right now aren’t great either.
- purple-leafy 2y agoWeb wise: C# is great, Node/TypeScript is passable, have heard good things about Go, Java is Java, Python is good for AI/data stuff, and I’ve heard good things about Kotlin. Also Flutter is an option. There are quite a few options
- frizlab 2y agoMost of these points have nothing to do with Swift.
- pkos98 2y agothere already is an lsp available (officially from Apple). Tried it out a month ago (on Linux using neovim) and the autocompletion was on par with golang lsp in terms of speed. Didnt check the lsp capabilities though.
- armchairhacker 2y agoSwift had good support in JetBrains AppCode. Maybe it still does, but probably not, because AppCode was sunsetted at the end of 2022 and stopped receiving updates in 2023 (https://blog.jetbrains.com/appcode/2022/12/appcode-2022-3-release-and-end-of-sales-and-support/ https://blog.jetbrains.com/appcode/2022/12/appcode-2022-3-re...). Which is really unfortunate. If Swift ever gets good support outside of Apple, I wouldn’t be surprised if JetBrains starts working on their Swift plugin again and releases it for IntelliJ and CLion. But despite this migration, my understanding is that Swift on Linux and the new Foundation (non-Apple standard library) is still lacking.
- pharaohgeek 2y agoWriting server-side Swift in AppCode or CLion was a breeze, too. The interface was so much friendlier than XCode. It's a real shame they discontinued Swift support.
- pudwallabee 2y agoAppCode was ten times the IDE xcode is, only problem is they couldnt parse Apple’s storyboards and xibs reliably and probably due to some proprietary knowledge required to make that work. I loved AppCode because I could go into a clients iOS app and the linter would immediately show so many problems that were easily fixable but Xcode would never show. I was sad to see it go.
- frizlab 2y agoIt has good support in VSCode already.
- ghayes 2y agoTry building a Swift project without Xcode. It works great. `swift build` and `swift test` all work significantly better than with Xcode, and there's no `xcodeproj` file. I am building in ST4 with good LSP and no problems at all. https://www.swift.org/getting-started/library-swiftpm/ https://www.swift.org/getting-started/library-swiftpm/ † The doc is about building a library, but building an executable works the same.
- frizlab 2y agoThere is an article pending in the swift website PRs on how to setup Swift for vim.
- jen20 2y agoLooks to be live now: https://www.swift.org/documentation/articles/zero-to-swift-nvim.html https://www.swift.org/documentation/articles/zero-to-swift-n...
- airspeedswift 2y agoyou might find https://www.swift.org/documentation/articles/zero-to-swift-nvim.html https://www.swift.org/documentation/articles/zero-to-swift-n... useful