Skip to content
Tech News
← Back to articles

Bringing Swift to the Apple ][

read original more articles
Why This Matters

Bringing Swift to the Apple II demonstrates how modern programming concepts can be adapted for vintage hardware, inspiring innovation and preserving retrocomputing culture. It highlights the potential for legacy systems to run contemporary languages, fostering educational opportunities and creative experimentation within the tech community.

Key Takeaways

Swift is the modern programming language behind many apps that run on modern Apple platforms. I thought it would be nice to bring a small taste of it back to Apple’s early days, the Apple II. It was Apple’s first mass-market series of machines, initially released in 1977 with a 1 MHz MOS 6502 CPU.

I built SwiftII, a Swift-flavored mini development environment for the original Apple II to a IIe and up.

To be honest, I built it with heavy AI assistance in my spare time. I will be candid later how it helped because that workflow was as interesting to me as the retrocomputing work itself.

One big caveat, this is not modern Swift and will never be. The full Swift standard library will not fit on this machine. SwiftII is a deliberate subset, much closer in spirit to Embedded Swift than the SDK meant for modern platforms like iOS or macOS.

My goal was to fit as much of Swift into the Apple II as I can while still reading like Swift on sight. If you know Swift, you should be able to read a SwiftII-compatible program and immediately understand it.

Other than the interpreter, I want my user to still have a relatively good user/developer experience. Because of this, I also had to build a launcher, file selector and text editor due to limitations I encountered on the Apple II.

Contents

This post is quite long, so here are the sections for you to jump straight to.

The App

Boot the appropriate disk and you land in a launcher. You can select an interactive REPL, a file browser that runs .swift programs straight from the disk, a full-screen editor all self-contained on one bootable floppy.

... continue reading