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.
> 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.
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?
No mention of compilation speed improvements? Very unfortunate. Compilation times slower than rust really hampers the devx of this otherwise decent language.
> 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.
> Swift 6.3 includes the first official release of the Swift SDK for Android.
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
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.
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.
In an effort to use swift for scripting, without the startup cost:
Swift Caching Compiler - https://github.com/jrz/tools
i worked with SwiftUI for about two years, and i think it's a really nice language. the compiler is very slow though.
but i think it's too coupled to Apple still. when i tried getting anything running on non-Apple, i had so much trouble i decided then to not even bother.
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.
did they ever add #define? bridging constants from the build system to swift with static NSString * const kConstValue = @XSTR(CONST_VALUE); is soooo annoying.
>nocopy for disabling copy-to-clipboard
Im curious how is this used?
Re: module name selectors, wasn't this already possible, e.g. ModuleA.getValue()? Though I suppose this disambiguates if you also have a type called ModuleA.
Anyone else think the weather in the screen shot at the top of the page is a bit off? Snow in Lisbon (apparently it snowed there once in 2006), rain in Reykjavik at -1°. AI slop?
My chances of landing at Apple increased when they launched Swift. I am too dumb to learn objective C but swift I can do.
I want to like swift so bad
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.
The Lord's language keeps getting better and better. The easier C interop could not have come at a more serendipitous time in my life.
Lack of Mingw support keeps me away from it, and Odin.
> @c @specialized @inline(always) @export(implementation)
Reminds me of "In case you forgot, Swift has 217 keywords now" https://x.com/jacobtechtavern/status/1841251621004538183
[dead]
The concurrency improvements in Swift 6 have been a long time coming. Interesting to see how the ownership model compares to Rust's — Swift chose a more gradual adoption path with opt-in strict concurrency, while Rust made it mandatory from the start. Both end up in similar places for safety but the developer experience getting there is quite different.
I'm glad Chris Lattner moved on and founded Mojo. It's such a cool language with ton of potential.
Swift lives only for macOS,iOS and besides those ecosystems does not have a solid and robust ecosystem to be used for anything else.
It's a shame but it for sure needs BigTech for it to be used anywhere else.
Swift reminds me a lot of Flash back in the day.
While the Flash guys had to use a native development environment and compile their stuff, I could just edit JavaScript in a plain text file and hit reload.
20 years later, and some of the same friends now swear by Swift. And have to use a native development environment and compile their stuff. While I still prefer to just edit JavaScript in a plain text file and hit reload.
Nice update, but it's a shame I can't write on it, not because I don't want to, but because it doesn't support it.
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++.