Swift 6.3 (swift.org)

by ingve 230 comments 340 points
Read article View on HN

230 comments

[−] dzonga 51d ago
good to see incredible stuff being shipped in Swift. Haven't used it since v3 though.

around 2015-17 - Swift could have easily dethroned Python.

it was simple enough - very fast - could plug into the C/C++ ecosystem. Hence all the numeric stuff people were doing in Python powered by C++ libraries could've been done with Swift.

the server ecosystem was starting to come to life, even supported by IBM.

I think the letdown was on the Apple side - they didn't bring in the community fast enough whether on marketing, or messaging - unfortunately Swift has remained largely an Apple ecosystem thing - with complexity now chasing C++.

[−] willio58 51d ago

> the server ecosystem was starting to come to life, even supported by IBM.

I was in college at the time and doing some odd freelance jobs to make some money. Unbeknownst to my clients I was writing their website backends in swift, using build packs on heroku to get them hosted.

It was a fun time for me and I love swift but I will admit last year I went ahead and rewrote an entire one of those sites in good ol typescript. I love swift but anything outside of the Apple ecosystem with it just seems like it hasn’t hit critical mass yet.

[−] isodev 51d ago

> Swift has remained largely an Apple ecosystem

Even today, with the fancy Swift 6.3, the experience of using Swift for anything other than apps for Apple platforms is very painful. There is also the question of trust - I don't think anyone would voluntarily introduce Apple "The Gatekeeper" in parts of their stack unless they're forced to do it.

[−] vmsp 51d ago
True. Google was even thinking of switching TensorFlow from Python to Swift.

https://github.com/tensorflow/swift

[−] mdemare 51d ago
Python 3 barely managed to dethrone Python.
[−] lynndotpy 51d ago
Python's interactive interpreter makes it pretty useful as a shell, for iterative development, and crucially useful in a Jupyter notebook. I've also found CircuitPython's interpreter to be bonkers useful in prototyping embedded projects. (This, on top of the nice datascience, ML, and NN libraries).

Swift just wasn't doing the same things. And even if it did, Swift would compete with other languages that were understood as "a better Python", like Julia. Even then, Swift only came to Linux in 2016, Windows in 2020, and FreeBSD less than a year ago with WWDC 2025.

I think it doesn't help that the mid 2010s saw a burst of Cool and New languages announced or go mainstream. Go, Julia, Rust, TypeScript, Solidity, etc. along with Swift. I think most of us only have space to pick up one or two of these cool-and-new languages every few years.

[−] ramesh31 51d ago

>"around 2015-17 - Swift could have easily dethroned Python."

NumPy, SciPy, Pandas, and Pytorch are what drove the mass adoption of Python over the last few years. No language feature could touch those libraries. I now know how the C++/Java people felt when JS started taking over. It's a nightmare to watch a joke language (literally; Python being named for Monty Python) become the default simply because of platform limitations.

[−] wiseowise 51d ago

> around 2015-17 - Swift could have easily dethroned Python.

Why could it?

> it was simple enough - very fast - could plug into the C/C++ ecosystem. Hence all the numeric stuff people were doing in Python powered by C++ libraries could've been done with Swift.

Half a dozen languages fit this description.

> the server ecosystem was starting to come to life, even supported by IBM.

No, not at all. Kitura, Vapor (a fitting name) were just a toys that no serious player ever touched.

[−] rasmus1610 51d ago
Maybe Chris Lattner leaving and creating Mojo also didn’t help in that regard.

Swift for TensorFlow was a cool idea in that time …

[−] tarentel 51d ago

> could plug into the C/C++ ecosystem. Hence all the numeric stuff people were doing in Python powered by C++ libraries could've been done with Swift.

In 2015-2017 you could interop with C, C++ support wasn't added until very recently.

I do agree with you though and I am not sure what the exact reasoning is, but Swift is definitely an Apple ecosystem language despite the random efforts to gain traction elsewhere.

[−] iamcalledrob 51d ago
That's my read too.

Swift was feeling pretty exciting around ~v3. It was small and easy to learn, felt modern, and had solid interop with ObjC/C++.

...but then absolutely exploded in complexity. New features and syntax thrown in make it feel like C++. 10 ways of doing the same thing. I wish they'd kept the language simple and lean, and wrapped additional complexity as optional packages. It just feels like such a small amount of what the Swift language does actually needs to be part of the language.

[−] michaelcampbell 51d ago

> Swift could have easily dethroned Python.

Just IMO, but... no. To me a "could have easily" requires n-1 things to have happened, and 1 thing not happening. Like, we "could have easily" had a nuclear exchange with the USSR, were it not for the ONE Russian guy who decided to wait for more evidence. https://en.wikipedia.org/wiki/1983_Soviet_nuclear_false_alar...

But even in '15-'17, there were too many people doing too many things with Python (the big shift to data orientation started in the mid/late 90's which paved the way to ML and massive python usage) by then.

The 'n' was large, and not nearly of the 'n' things were in Swift's favor then.

Again, IMO.

[−] oefrha 51d ago

> Swift could have easily dethroned Python

No way something that compiles as slowly as Swift dethrones Python.

Edit: Plus Swift goes directly against the Zen of Python

> Explicit is better than implicit.

> Namespaces are one honking great idea -- let's do more of those!

coupled with shitty LSP support (even to this day) makes code even harder to understand than when you import * in Python.

Edit 2: To expand a little on how shitty the LSP support is for those who don't work with Swift: any trivial iOS or macOS project that builds fine in Xcode can have a bunch of SourceKit-LSP (the official Swift LSP) errors because it fails to resolve frameworks/libraries. The only sane way to work with Swift in VS Code or derivatives I've found is to turn off SourceKit diagnostics altogether and only keep swiftc diagnostics. And I have the swift-lsp plugin in Claude Code, there's a routine baseline of SourceKit errors ignored. So you have symbols without explicit namespaces, and the LSP simply can't resolve lots of them, so no lookup for you. Good luck.

[−] pjmlp 51d ago
The thing what people don't get with C++'s complexity is that complexity is unavoidable.

It is also there in Ada, C#, Java, Python, Common Lisp,....

Even if the languages started tiny, complexity eventually grows on them.

C23 + compiler extensions is quite far from where K&R C was.

Scheme R7 is quite far from where Scheme started.

Go's warts are directly related to ignoring history of growing pains from other ecosystems.

[−] zem 50d ago
I had a similar journey with F# - the language looked excellent and I really wanted to make it one of my go-to languages, but every time I tried to use it I found bits that would only work on windows (especially around desktop apps). I finally just gave up, though I hear it has gotten better at being truly cross-platform these days.
[−] pjmlp 50d ago
Python has been slowly growing since 1990's.

Python powered by C++ libraries comes from HPC folks, places like CERN and Fermilab, they would hardly touched Swift instead.

[−] Terretta 51d ago

>

Haven't used it since v3 though.

Since 5.10 it's been worth picking back up if you're on MacOS.

[−] afavour 51d ago
Eh, I don't think Swift would ever have dethroned Python. What pain point would it practically solve? I don't use Python often but I don't hear folks complaining about it much.

I do, though, think Swift had/has(?) a chance to dethrone Rust in the non-garbage collected space. Rust is incredibly powerful but sometimes you don't really need that complexity, you just need something that can compile cross-platform and maintain great performance. Before now I've written Rust projects that heavily use Rc<> just so I don't have to spend forever thinking about lifetimes, when I do that I think "I wish I could just use Swift for this" sometimes.

You're right, though, that Swift remains Apple's language and they don't have a lot of interest in non-Apple uses of it (e.g. Swift SDK for Android was only released late last year). They're much happier to bend the language in weird ways to create things like SwiftUI.

[−] WD-42 51d ago
Dethroned Python? The Apple language, seriously. Where is numpy for swift?
[−] 0x3f 51d ago

> Swift is designed to be the language you reach for at every layer of the software stack.

It's a nice lang for sure, but this will never be true with the way things are. Such wasted opportunity by Apple.

[−] cdcarter 51d ago
I spent last week (with Opus, of course) porting the xv6-riscv teaching operating system to a bunch of different languages. Zig, Nim, LISP, and Swift.

The improvements in embedded Swift have definitely made it one of the most enjoyable/productive languages to work on the OS. I feel like I can build useful abstractions that wrap raw memory access and make the userland code feel very neat.

On the other hand, the compilation times are SO bad, that I'm really focusing on the Nim port anyway.

[−] drzaiusx11 51d ago
No mention of compilation speed improvements? Very unfortunate. Compilation times slower than rust really hampers the devx of this otherwise decent language.
[−] w10-1 50d ago
Beyond the marketing view... here are the (incomplete) changes:

  https://github.com/swiftlang/swift/blob/main/CHANGELOG.md
Here are the evolution proposals that landed in 6.3:

  https://www.swift.org/swift-evolution/#?search=6.3
Overall 6.3 ended up mostly about integration: stdlib, c/c++ (often driven by swift-java interop needs), and builds.

SPM (swift package manager) is slowly reaching out to take over xcode build features (e.g., resources most recently), and they have been inching and hacking their way to a new swift-build engine (now experimental) and "prebuilt" modules for the compiler/IDE macro support. Things Go Wrong all the time when trying to replace parts while driving, and there's very little visibility or control over the interactions between SPM and Xcode.

Conversely to integrations, endogenous language progress seems relatively quiet because there's a lot of behind-the-scenes work extending the initial blush of lifetime controls to iterators, stdlib types, etc. (never mind parameter packs). They're in year 4+ of building out the function-coloring of concurrency and isolation domains (6.2 had an "easy" mode that caused lots of problems), so adding year 2+ dataflow coloring of lifetimes is doubly complicating.

Naturally, diverse support for exciting new features results in quite a spread in the third-party library ecosystem of support for various language features. And now with AI entrepreneurs rewriting and porting any project that can score hits and kudos, the usual open-source authorities are losing their steam.

Finally, there's the baseline platform complexity of multiple OS and devices, physical and simulator debugging support, cloud CI...

So: that makes four dimensions of complexity. As a Swift developer you'd have to be very careful to stay on a working path as things shift underneath you.

All for the love of it?

[−] sirwhinesalot 51d ago

> Swift 6.3 introduces the @c attribute, which lets you expose Swift functions and enums to C code in your project. Annotating a function or enum with @c prompts Swift to include a corresponding declaration in the generated C header that you can include in your C/C++ files

Why did this take so long to be added? Such strange priorities. Adding an entire C++ compiler for C++ interoperability before adding... C exports. Bizarre.

[−] ttflee 51d ago

> Swift 6.3 includes the first official release of the Swift SDK for Android.

[−] mikusnuz 51d ago
The noncopyable types improvements are the most underrated part of this release. Finally makes it practical to model unique ownership in Swift without fighting the compiler.
[−] asimovDev 51d ago
I remember building dylibs in Swift for use in C programs, had to use @cdecl annotation iirc to achieve that, which was experimental. Good to see it's finally official
[−] lijunle 51d ago
How is the toolchain? Does Swift Lint and Swift Format support the newest version. Honestly, the modern program language should have the built-in formatter and recommend lint rules. It is not just shipping a program language, it is a while ecosystem.
[−] jbverschoor 51d ago
In an effort to use swift for scripting, without the startup cost:

Swift Caching Compiler - https://github.com/jrz/tools

[−] rzerowan 51d ago
Whats the stdlib situation for swift in comparison to newish languages like go or rust. I know its not batteries included lke python - and doesnt have a massive dev ecosystem of helper libs seeming to be mostly tied to macOS/iOS operating system API/ABI.
[−] slopinthebag 51d ago
Swift truly is one of the languages of all time. I started a mobile app with the UI built in Swift and the core in Rust. The amount of implicit and hidden behaviour, magical fields being generated on objects because of certain annotations, the massive amount of @decorators...it's too much. I'm going to have an LLM generate the SwiftUI and touch as little of it as possible.

It's also strange because before I learned Swift, I heard about how beautiful it is but I find it much noisier than Rust.