[Thought experiment] Bringing swift into an experimental branch?

From: Jordan Hubbard <jordan.hubbard_at_gmail.com>
Date: Mon, 16 Jun 2025 22:04:37 UTC
I know that the topic of “bringing additional languages” into OSes is controversial and, frankly, we made a bad call with macOS when we brought the kitchen sink in (everything from Tcl to Python) and regretted it afterwards, so this is just a thought experiment, as noted in the subject.

All that said, I think a more modern language than C++ being readily available has a useful way of shifting development and generating some excitement, and a modern language that is also strongly supported by your existing clang / LLVM compiler toolchain represents an increment along the same evolutionary path.  It’s also a language that needs a number of components to be tightly in sync (libdispatch, clang, llvm, various compilation tools and libraries, etc) before any 3rd party developer can even compile it for FreeBSD, so saying “it’s a ports collection problem” may ultimately work, but not without considerable pain, as evidenced by the fact that ports/lang/swift does not exist.

Why swift, if anything?

Python changes too often in incompatible ways and Rust is still going through its Rust foundation stewardship changes (that didn’t form until 2021) plus if you bring Rust in, you’ll be immediately enmeshed in the “should we just rewrite the kernel in rust?!” topics that seem to plague Linux.   Swift, on the other hand, is an application and service development language and sits nicely on top of what FreeBSD already has - nobody’s going to push to rewrite the kernel or base utilities in Swift, but you do get access to a very active community and, of course, the backing of a major player like Apple and the open source swift ecosystem.

I’m told that Swift also just announced support for FreeBSD, so if there is ever a time, this might be it?

- Jordan