On the road to Swift 6

For me Swift 5 has really shown just how well the language and tooling is maturing. Really the only things I feel that Swift is still lacking are async/await and support for non-apple platform such as Windows, Android, and WASM. I’m so excited that the core team is making these points a main focus. Can’t wait for Swift 6!

27 Likes

Thanks @tkremenek, this sets out a fantastic path for the future of Swift. The goals seem very well chosen and @tomerd & @compnerd are great Core Team additions to help achieve those goals. Congrats both!

12 Likes

I suspect that Swift 6 will not push generics features "to their limits", but I do suspect that some work in this area will be prioritized especially where there is a compelling need that will empower users to write better APIs. For example, I mentioned variadic generics in my post.

I also would not interpret what I wrote above as an exhaustive list. I intentionally left some of the bullets open-ended. Specific investments will become more clear over time. I was mostly trying to touch on some key themes that touch on areas where Swift would benefit the most from investment.

29 Likes

Thank you for your honest answer. I haven‘t missed the mention about variadic generics (which likely have its origin from Combine and SwiftUI) and I understand that some of the unimplemented features are massive and would require a lot of time and effort to become reality. I was only wondering if generics won‘t be one of the official focus areas of Swift 6. ;)

Great news. Congratulations to both new member of Swift core team.

Talking about machine learning, I hope the Swift core team would like to give a little bit more attention to the Swift for TensorFlow team. They have some ideas that could be considered to be part of Swift language feature regarding machine learning. For example, differentiable programming.

How about Apple's Combine and SwiftUI frameworks? Is it possible to make them work on other platforms as well?

7 Likes

I sent this post out in October that touched on this:

That was on behalf of the Core Team expressing support to pull that feature in the language through the normal evolution process.

9 Likes

That's up to Apple management, not the Swift Core Team, per se.

Excited to see so many goodies coming in the future. The new diagnostic is the blast! Great DSL is a blessing. Any chance Higher Kinded Types making its way to the list? Whenever we force to use AnyView or any other type erasure it feels like it is not what we want to do, but what we forced to do because of no HKT in place. We should give engineers all the tools to keep types expressive so the compiler will have all the data to deliver so much needed optimizations for Combine, SwiftUI and other things alike. It is clear from already made type decisions that this is chosen direction but the absence of HKTs leaves a huge hole in this strategy.

5 Likes

This. Resorting to the Any* erasure types feels wrong. This should be fixed.

9 Likes

What would higher-kinded types enable you to do in SwiftUI?

8 Likes

Great to hear folks, Async Await would be a god send just sayin :hugs: :kissing_smiling_eyes: :star_struck: :clap: :clap: :clap: :clap:

13 Likes

This is all very exciting! I think expanding the list of officially supported platforms and focusing on evolving the language to enable services will help adoption incredibly. The additions to the core team help show the serious interest for investing in those areas which is exciting!

4 Likes

Can you expand on this at all? Does this refer to additional libraries sponsored by Apple, like Swift Numerics? If not, what changes, in particular, does this entail? Something more than the additional working groups mentioned?

It saddens me that an official and integrated package registry still isn't in the plans. I can think of nothing more important to "cultivate a rich open source library ecosystem".

Again, is there anything here you can go into more detail on? I think many of are aware of ongoing projects like the new diagnostic system due to the blog post, but I haven't seen anything recent on the other areas. Are these new projects, or references to ongoing ones?

Is there anything more concrete you can share about the cadence or intended size of these releases?

2 Likes

Major Swift releases are time-based, happening roughly twice a year. What constitutes a "major" release is one that is based on continuous development on trunk, or master. Examples of major Swift releases include Swift 4.0, 4.1, 4.2, 5.0, 5.1, 5.2, etc.

While Swift releases are time-based, feature work can (and often) spans multiple releases. When we consider efforts that are longer-term arcs usually there is incremental progress along those arcs in each successive major Swift release. For example, while ABI stability "went live" in Swift 5.0, the work went into that spanned multiple releases. Similarly, some pieces of the ownership model have already fallen in place in stages with the gradually ramping up of enforcement of exclusive access to memory.

When Swift 6 is released it will be a culmination of several longer-arc efforts, but I expect that all of them will have pieces stage in over the intermediate releases.

I hope that answers your question on the size and cadence of the releases. This exactly matches how Swift has been developed since it was released.

11 Likes

While all the work is transparent on GitHub and can be followed along there, it is a good point that some users would like to know more about the efforts that are underway without having the following the blow-by-blow development. To name two specific examples, there is work underway to significantly improve the performance of incremental builds through far more precise dependency tracking, as well as major efforts to improve code completion performance, reliability, and experience.

I think @xedin's blog post on the diagnostics work did a great job of surfacing the investments in that area. My plan was to use the blog to showcase other investments on the tooling experience with Swift, especially when they reach interesting milestones of functionality/improvement that are interesting to share with the community.

18 Likes

I think this means a variety of things.

Broadly, I was speaking that I expect to see more libraries being published to fill in the missing "batteries" in the [cross-platform] Swift story. The creation of these libraries is driven both by individuals and companies, such as in the case of Apple publishing Swift Numerics.
Apple will certainly sponsor more libraries, but I expect that others will do so as well.

One model that is interesting here is how to encourage a broader federation of high quality libraries that cover the needs of a specific domain. For example, the server work group's charter, particularly after it was rebooted to adjust its approach and focus, was to do just this in the server domain. That group acts as stewards to both encourage the development of missing libraries for the server space but also to provide various recommendation levels for those libraries based on their maturity. Through that model we've seen the steady appearance of more libraries in that space that have some amount of oversight for consistency and quality through an incubation process. That model might be really interesting to explore for other domains as well.

A high-quality package registry would be immensely powerful for the Swift ecosystem and remains an interesting direction — and potentially one that fits in Swift 6. GitHub has announced plans to support Swift packages in their registry; that would be a great addition and it will be interesting and informative to see how it gets used by developers.

10 Likes

Unfortunately, a big part of this picture is Xcode and iOS releases the bulk of Swift usage is tied to which would make a timeline and more transparent communication on both useful and appreciated.

On the Swift and Swift’s standard library for Windows and Linux, does Apple plan to financially back this by employing multiple people paid to further develop and maintain those ports (donating money to a Swift foundation for example that employs such personnel or dedicating Apple’s internal employees to this task full time)?

2 Likes

While all the work is transparent on GitHub and can be followed along there

I think the whole community appreciates the level of community transparency to the Swift project overall, I think last WWDC with Combine and SwiftUI and the changes to Swift itself that were kept under wrap until WWDC and then kind of fast tracked through the evolution process one does wonder if there are other internal efforts to improve the developer experience that are needing changes in Swift themselves that we may only see announced by Apple at the next WWDC, part of presentations and tutorials there, etc...

3 Likes

Firstly, thanks to the Swift Team for their continued hard work to push Swift forward to what Swift has become today. It's an effort which has involved a lot of blood, sweat and tears! I know that there are some grumblings sometimes on the forums but everyone really does appreciate how hard everyone back at base is pushing.

I also want to congratulate @compnerd and @tomerd for their well deserved promotions into the core team. Both of your contributions have been outstanding and very welcome. I can't wait to see where you take us next!

@tkremenek thanks for giving us this outline of what's going on in the depths of the ongoing development of Swift. Obviously not everything can't be worked on all at once and priorities have to be planned out and tradeoffs made. I think the direction you have outlined makes sense in the grand scheme of things, even if everyone has their own little feature they are really looking forward to and want sooner than other things.

I do have to raise one point though; whilst its true that everything is out in the open on Github, and its one of the places I look every few weeks to see what's going on, it's still not immediately obvious as to what's being worked on at any one time. A lot of the PRs need some kind of context as to how they fit in to the big picture. I'm not a compiler engineer, and whilst I understand the high level concepts, the nitty gritty is something that alludes me and to tell you the truth I don't really have the spare time to learn.

Whilst I really do appreciate the openness of future plans, what's being worked on now etc. in this post, I think it would be nice to have some place to see what high level features are being worked on at any one time. I'm not saying to use Trello, but something like that which only needs to get updated once every few weeks would be very useful to give context to a lot of the work being done behind the scenes. It would allow the general Swift community, even people who don't actively get involved with the community, to have a quick overall view of what's being worked on, what's in the pipeline, roughly what's being earmarked for what version etc.

I visit the forums fairly regularly and recently I was feeling a bit lost into the overall direction that the language was taking. I understand that this is because the concentration of work has been about under the skin improvements, but that's just not visible to the average Swift user until its actually released or a blog post is written about it (which are greatly appreciated but quite few and far between). I think exposing the under the skin improvements at a high level would give the community a greater appreciation of what's going on and for people like myself, not feel as lost.

Anyway, thanks for jumping in and giving some valuable insights as to what's planned for the next year or so, its greatly appreciated.

5 Likes

I promise I'm about to finish the new draft document about variadic generics... just a couple of sections left to refine! :pensive:

25 Likes
Terms of Service

Privacy Policy

Cookie Policy