On the road to Swift 6

Agreed! Maybe something like a monthly blog post on swift.org? :thinking:

BTW I'm super happy to hear that Swift being available on more platforms is a priority! On that note, congrats to @compnerd & @tomerd :clap:t4::clap:t4::clap:t4:

1 Like

Is there any thought to moving to Python 3 for Swift 6? As a corollary, would it be possible to expand support for other flavors of Linux like, oh, I dunno, Fedora? :innocent:

7 Likes

I have watched and dug around Github to understand what this support means, either now or in the future, and have been unable to find any detail, and the current UI and implementations don't appear to react to files indicating there's a swift package defined (as other languages do). Is anything public that has appeared since that announcement on their blog in June where we can learn more about what might be made available, how it works, or (I know - real long shot) when some of it might make an appearance?

1 Like

This all sounds great! Awesome goals and direction. The one thing I’m surprised about is there is still no mention of the generics manifesto and generalized existentials. That is something I think we all run up against all the time. Please tell me that’s slated for Swift 6 as well but just not mentioned?

5 Likes

World domination is not reached yet

  • To reach world domination is always a dream because Google, Microsoft and Java has been in the business longer and has more valuable community unless macOS gains significant market share, by the way I'm using macOS too.

Serverless Swift

  • Industry have adopt Go, C# and Java as they are engineering for the web scale, if Swift appear to be less performant, I don't see how its will gain enough traction except for low traffic but PHP, Nodejs and Ruby fits that space too.

Web frameworks

  • I believe the community is focused on maintainability? I tried to love Vapor and Perfect but felt Go and Nodejs are more pleasant to build.

Great achievements so far, and the 3 highlighted areas are exactly what is need in my opinion.

A few thoughts:

  • People will invest massively in Swift if and only if they can reuse their code on a variety of targets. If they can't, they'll use alternatives that allow that, and use Swift where it's needed. Use it as a repair/port tool instead of a design tool, as it should be. Going beyond Apple platforms towards Android, Linux (+server), Web, and many other like IoT, scripting, etc. is needed for growth and adoption. Rust is going there, Swift can too.
  • Let's not forget the basics though. Looking back, it took a couple years to get support for static libs which are an essential building block for app makers. Sometimes it looks like advanced/experimental features are given more attention than the basics. Like, in Swift 5.x, it's still not possible to do float x[32] without typing Float 32 times as a tuple or without using dynamic allocation. Also, Xcode integration is sometimes bumpy (Archive failed), especially with more complex (real-world) setups, and may have no workaround until next year's version. Things like these slow down adoption. Please get the basics right.
  • Concurrency & ownership are the next major steps obviously that will be extremely useful, and they've been mentioned, so that's great.

Even though language diversity is good, switching languages for achieving different goals is hard for developers. (Speaking for myself) it's hard to attain proficiency in multiple ecosystems unless you practice them all very often, which typically does not happen. We tend to specialize in one tool. This is why I believe the broader Swift gets in the kinds of problems/platforms it can address, the more appeal it will have.

Anyways, exciting times, let's keep Swift moving forward! And kudos to everyone involved.

7 Likes

True, that syntax is not supported in Swift (yet, but is in Rust for example), but you can still easily build type allowing for arrays of some defined fixed length N. So not a huge problem. But would be nice on syntax level :+1:

1 Like

Excited about these directions! This along with the recent improvements to SwiftPM gives me a lot of optimism about the future of the language!

Curious what experience are you basing this on. IME the instances of developers using a language in more than one environment are pretty much limited to C/C++, Java, and JavaScript.

4 Likes

It's fairly common for server side applications to be developed on a different host system than what will actually be running the code. Although server side Swift is still in its infancy, cross-platform support is crucial in that area.

2 Likes

Ok yes, (though Docker complicates this), for Server-side Swift it's important for an application to work identically cross-platform (or at least on Linux/Mac) to avoid complications between your development and production environments. Though that's far from a solved problem with plenty of existing languages used on the server.

Are there other places? It seems there has been plenty of investment in Swift already even with Apple platforms being the only mainstream use-case.

It’s so exciting to be part of Swift’s community since Swift 3 (as my first programming language). It’s awesome how fast Swift became matured language and I would really love to help developing Swift as fast as I will get good enough to push some PRs!

2 Likes

Just looking at existing OS code from the last 40+ years (C/C++). OS/math/graphics/game/network/etc libraries could all be written in Swift from now on, or in a language with similar modern qualities (safety, clarity…). But that requires ubiquitous/unconstrained availability.

6 Likes

What I’m interested in are fixed-size arrays that are struct types that can be stack allocated (like the C array I mentioned). Is that what you’re suggesting? How would you achieve that with Swift 5?

1 Like

Yeah, Swift isn't yet an option to replace ubiquitous low-level libraries. Realistically it'll still be a few years until that happens.

2 Likes

It would be fun to take further discussions about this in this thread about fixed size array hacks that I just created!

2 Likes

WASM stands for Web Assembly, which is a binary file format designed to be executed in web browsers.

There is actually a project to compile Swift into WASM. This is one way to target web browsers, but far from the only one.

1 Like

Really exciting stuff! I'm really looking forward to improvements in concurrency and ownership in Swift. Also variadic generics will be a really welcomed addition to the Swift language!

@tkremenek, will improving the String API be part of the direction for Swift 6? Providing better ergonomics and high level support for regular expressions really has the potential to make strings much more powerful in Swift. Also, it would be nice to ditch the clunky and limited API of NSRegularExpression that as of now we have to depend on. This was laid out in the State of String: ABI, Performance, Ergonomics, and You! and the corresponding Swift Forums thread.

2 Likes

As a Swift compiler developer myself, it's hard to commit to doing this regularly, because it takes significant effort to distill compiler-implementation work down into digestible content, and of course work-in-progress can change significantly. Technical blog posts on swift.org require a lot of effort.

I feel like the Swift weekly brief does a decent job of collecting what's going on and pulling out the interesting tidbits from GitHub, Twitter, the forums, and other Swift gathering places. I'm sure they'd appreciate more help keeping the community informed!

All that said, I wrote up something about progress on the function builders implementation that's probably the kind of thing you're looking for.

Doug

23 Likes

Sorry, I didn't mean bi-weekly in depth blog posts. That would definitely take significantly more time and effort. While I appreciate the user detailed blog posts all I was suggesting was essentially the name of a feature/fix and roughly where it was in progress in the grand scheme of things. Nothing detailed, just really high level.

But thinking about it you are right in that it's probably very difficult to distil a lot of that work down to simple things that would actually make sense out of context. I did used to check out the weekly brief for a while, I'll make sure to check back more regularly and see what's going on there.

I'll definitely check that out, that's my next stop this morning, thanks!

1 Like