So Swift is finally open sourced and we are seeing some very interesting things in there!

What’s in there

First of all there’s the runtime and stdlib in the open source part - as we probably all expected. But they also reimplemented Foundation and XCTest, which is important for cross-platform portability cause otherwise you couldn’t use all the NS* classes - which will also loose their prefix in the nearer future btw!

Linux Support is there from the start and will be maintained by Apple beside OS X and iOS and all it’s spin-offs. There are already people working on FreeBSD support and I think also Windows will come eventually from people in the community since LLVM and clang are already ported to Windows.

The two things I’m exited about the most is the public Swift 3.0 Roadmap and the Swift Package Manager. Would be great if we get a fully integrated alternative to CocoaPods - which is great but has its problems.

Perspectives for the future

So where is all this heading?

I think we’ll start writing server code in Swift for our apps pretty soon. There are already a bunch of prepacked Swift Docker containers out there and people are already playing with it. But to get it ready for production usage we also need great frameworks for the server side. Having a Java Spring MVC background, I think we need something similar to Spring. The framework needs to be powerful and should reduce boilerplate code so that you can focus on writing your application code and all the nasty request handling, queuing, threading, JSON/XML (de)serialisation, header handling, security, authentication and authorisation stuff is done for you and you only need to configure it.

For that we also need frameworks to access all sorts of databases and cloud resources as well. We need a very good AWS Server Side SDK in Swift and it would be awesome if AWS Lambda would support Swift as well. At the moment we could maybe do something like this guy proposed for GO.

We also need a really good (free?) IDE for Swift on other platforms - maybe written in Swift ;-). Otherwise we’ll still constrain the language to people who have Apple Hardware. Maybe JetBrains could expand their AppCode IDE?

If we as a community manage to build all that great stuff - and I think we’ll manage that - Swift has a great future on the server side. Swift might even pressure Java, Python and Scala.

We probably cannot “convert” all those “script kiddies” who love Python and Javascript with their unsafe and dynamically typed concept. But Swift has the great advantage over Java that it’s less verbose, more clear and shorter. It is easier than Scala, which is pretty powerful but also sometimes just unreadable and you don’t know what the code is doing if you haven’t mastered every aspect of Scala yet. Also Swift wasn’t born as some academic language to try something. It was developed to make programming and especially iOS App programming easier and available for more people. Because of that I hope that a lot more students will learn Swift as their first programming language.

But there are also some things in the language that I still miss. There’s no real way of meta programming which blocks things like powerful dependency injection and mocking frameworks. I’m not asking for a dynamic system with reflection like in Java, but I think about a concept of custom annotations (similar to IBOutlet) which inject some developer defined code or behaviour on compile time. I don’t have a real finalized concept and I’m also sceptical if it aligns with the goals of simplicity and clearness of Swift.

Open sourcing Swift is a great milestone and now it’s up to us as a community to make the best out of it and support those guys at Apple. They probably had a hard time to get all the permissions to open source it and to work on it in public on GitHub. Let’s honor that and become a great community.