Hacker News new | ask | show | jobs
by igotsideas 2684 days ago
Well written explanation! I really enjoy Swift but it's not as accessible as some of the other languages mentioned. I have a 2011 Macbook Pro and wanted to use the latest and greatest new Swift features. Unfortunately, my machine is too old to upgrade to Mojave which means I can't download the latest version of xcode, which means no new version of Swift. I'm not mad at Apple in the least bit. I just wish I could use Swift 4 on my machine.
5 comments

If you don't mind stranding from the 100% stable roads, you can install Mojave on your macbook using this patcher: http://dosdude1.com/mojave/

Personally I am running Mojave on a late 2009 macbook pro and it still works amazingly well. Transition from Mojave and especially the new XCode are also way faster than previous iterations. There are caveats though, as the processor in my computer is too old, I had to hack homebrew to compile everything from source.

(Also, using the patcher does not hinder my ability to push updates to the App Store or use iMessage, if that is a concern)

I'm gonna try this, thank you!
FWIW, you can install Xcode 10.1 on High Sierra, and use the Swift.org 5.0 toolchain (https://swift.org/download/#snapshots) or build swift from source. You can't ship App Store apps this way, but it works great for experiments.
My machine is too old to upgrade to High Sierra.
https://support.apple.com/kb/SP765?locale=en_US

> MacBook Pro (Mid 2010 or newer)

So your 2011 should be supported. If it's actually an older machine, compiling from source is an option, if slightly inconvenient.

You're right. Downloading now. Thank you!
You might be interested in checking out Swift on Google Colab (e.g., https://colab.research.google.com/github/tensorflow/swift-tu...)
Have you considered trying to build Swift from source? It's a bit time-consuming the first time, but subsequent updates less so - and you'd have Swift 4 at your disposal.
Isn't Swift open source and available to build anyway, regardless of Xcode and OS X version? Even on Linux etc?