Swift on old Macs

I have a Mac Book running 10.7 at home, and an iMac running 10.8 at work.
I used to do a fair bit of Objective C programming quite a few years back, but I am reluctant to upgrade.
Is there any way I can program in Swift with these Macs ? Hope so.

Swift only supports deploying as far back as Mavericks (10.9) since it relies on changes to the Objective-C runtime in order to interoperate. Recent versions of Xcode also require even newer macOSes. You may be able to build the open-source toolchain on older versions of macOS (though it'd be difficult due to SDK changes that have happened since then), but it would be easier to upgrade your Mac if you want to develop in Swift.

Not sure if Linux is considered an upgrade - but I heard rumors you can run Swift on it ;-)


Folks, thanks for the replies. I think I'll leave it: upgrading will break other existing, reliable software I use. I think it's a shame when there's more interest/effort in providing for other platforms, but not for older, still very functional computers nominally of the same platform.

That's one of the things I like in Go. I just recently built a go app, copied it over to an old 10.7 xserve and it just ran, without installing anything else there. Same deal with running something on a Raspberry Pi, just cross-compile for linux arm on my mac (one line command) and copy over on the Pi.

One could probably port Swift with Objective-C interop disabled fairly easier to older macOS versions, if you don't need Cocoa support.