Yay, this is a big release, bringing data race safety to Swift. Makes it a peer of Rust in that respect, though often considered easier to learn and write. Concurrent code is so much more fun to write when you have guidance from the compiler on how to work safely.
It’s been such a long time coming, and I’m excited to use it especially for new projects. Existing code isn’t easy to migrate to the Swift 6 language mode, but at least it can be done gradually. And to your point solving these errors is easier than writing the whole app with linear types.
Maybe the current Foundation unification move is a step forward for wasm, and potentially smaller size than the current swiffwasm.org open source builds.
The Windows support is definitely better. You can at least now install Swift to wherever you want it to be installed. No more dumping it under a C:\System\ directory! Though the installer does not automatically escalate to administrative permissions if you try to use C:\Program Files\Swift as the install root 😅
Anyone have much experience with the C++ interop? Most languages seem to rely entirely on extern functions (which feels like a lot of work, writing all the wrapper functions required to expose an OO codebase as C routines, which is why I’ve never bothered to do so).
Swift on the other hand seems to be going all in on connecting Swift code directly to C++ objects.
At least that’s what it looks like from afar. Am I misreading the situation? It would be far from the first time.
Copy-pasting here a comment I’d made on another site:
I’m not a (direct) user of the C++ interop, but everything I’ve heard about it has been quite positive. A few hopefully relevant resources, first a couple of videos:
Off-topic, but now with static linked binaries, how would one go about learning “Swift for Web Services”? Usually I find that people say “Just watch the keynotes and build a macOS/iOS app”. But would like to write a web service and see how it goes.
You can start with the Swift on Server topic and its guides, and in this case a particular page on the Static Linux SDK. Also be aware there is a language guide book you can find on swift.org.
The Swift extension for VS Code and its LSP provide official editor functionality outside Xcode.
The Swift Package Index site is what you think it is, and it hosts package descriptions, OS compatibility tables, generated documentation, etc. It can also list packages by author/GitHub org such as Apple and swiftlang. Packages like Vapor, Hummingbird, swift-testing, and swift-async-algorithms can be installed with Swift Package Manager (SPM) which is part of the language installation. Foundation is where you’ll get dates, JSON encoding, localization, and value formatters. On Apple platforms that’s preinstalled as a system framework, but on Linux I think you have to add it as a package?
Of course you can always watch the videos too. Swift concurrency is of particular interest for server apps; there are a lot of videos on that topic and on the language in general.
Yay, this is a big release, bringing data race safety to Swift. Makes it a peer of Rust in that respect, though often considered easier to learn and write. Concurrent code is so much more fun to write when you have guidance from the compiler on how to work safely.
It’s been such a long time coming, and I’m excited to use it especially for new projects. Existing code isn’t easy to migrate to the Swift 6 language mode, but at least it can be done gradually. And to your point solving these errors is easier than writing the whole app with linear types.
Cool! Was hoping to see oficial wasm support. Apple seems to have some experimental examples on it (https://github.com/apple/swift-for-wasm-examples)
Maybe the current Foundation unification move is a step forward for wasm, and potentially smaller size than the current swiffwasm.org open source builds.
Seems like a good step toward broader adoption through better support of the non-Apple platforms.
The Windows support is definitely better. You can at least now install Swift to wherever you want it to be installed. No more dumping it under a
C:\System\directory! Though the installer does not automatically escalate to administrative permissions if you try to useC:\Program Files\Swiftas the install root 😅Anyone have much experience with the C++ interop? Most languages seem to rely entirely on extern functions (which feels like a lot of work, writing all the wrapper functions required to expose an OO codebase as C routines, which is why I’ve never bothered to do so).
Swift on the other hand seems to be going all in on connecting Swift code directly to C++ objects.
At least that’s what it looks like from afar. Am I misreading the situation? It would be far from the first time.
Copy-pasting here a comment I’d made on another site:
I’m not a (direct) user of the C++ interop, but everything I’ve heard about it has been quite positive. A few hopefully relevant resources, first a couple of videos:
And then a series of blog posts by Doug Gregor:
And finally:
Thanks!
Is there a good doc that explains Swift 6 by giving the diffs relative to Rust (for an audience who already uses Rust)?
Off-topic, but now with static linked binaries, how would one go about learning “Swift for Web Services”? Usually I find that people say “Just watch the keynotes and build a macOS/iOS app”. But would like to write a web service and see how it goes.
You can start with the Swift on Server topic and its guides, and in this case a particular page on the Static Linux SDK. Also be aware there is a language guide book you can find on swift.org.
The Swift extension for VS Code and its LSP provide official editor functionality outside Xcode.
The Swift Package Index site is what you think it is, and it hosts package descriptions, OS compatibility tables, generated documentation, etc. It can also list packages by author/GitHub org such as Apple and swiftlang. Packages like Vapor, Hummingbird, swift-testing, and swift-async-algorithms can be installed with Swift Package Manager (SPM) which is part of the language installation. Foundation is where you’ll get dates, JSON encoding, localization, and value formatters. On Apple platforms that’s preinstalled as a system framework, but on Linux I think you have to add it as a package?
Of course you can always watch the videos too. Swift concurrency is of particular interest for server apps; there are a lot of videos on that topic and on the language in general.
Probably take a look at Vapor? I haven’t used in anger, but it appears to be the typical recommended framework.