Summit sunday cover?fm=jpg&fl=progressive&q=75&w=300

Swift Panel: Where do we go from here?

Recorded on the last day of Swift Summit, and released in time for Swift’s 1st birthday, Kyle Fuller, Jack Nutting, Boris Bügling, Radek Pietruszewski and Gem Barrett join Abizer Nasir to discuss the question: As a community, where do we go from here?

Capturing the inspired, optimistic, and reflective mood at the end of the two day conference, the panelists look back on what we’ve learned in the past year, and more importantly, look ahead to the things we can do together in the next.

You can read an edited transcript below.

Q: I’d like to start by asking, what have you learned in the last few days that you will immediately put to use?

Boris: I’ll be deleting all my Objective-C, because it’s technical debt.

Gem: Marcin Krzyżanowski’s cryptography talk was amazing. I really loved that talk, so I’ll definitely be looking more at his project. I also heard great things about using emojis in talks (thanks Alex Ackers!), so I think I’ll be considering that in the future as well.

Kyle: We’ve been exposed to a lot of new concepts that have been around for years, like functional concepts in Objective-C. It would be really great if we can start exploring these again, now that we have a new chance to learn all these ideas. And with Gem, we should also just use emoji everywhere.

Radek: While backstage Boris made a very, very good point about the new Unicode 7. Although, I’m sad that they didn’t add a dinosaur emoji, which would be very useful for representing Objective-C.

Jack: I think that’s a good point, but I also love dinosaurs. Despite what I said in my talk, I have been doing a lot with functional programming in Swift these past few months. My takeaway from this conference: I’m actually inspired to do even more functional programming now, having seen many more examples of the different ways people are approaching it.

Q: Would you use emoji in your code right now? Do any of you currently use emojis?

Kyle: I have some code for a command line tool, where emoji represent thumbs up or thumbs down for the return status of your function. You have to return an integer, so the emojis map to zero or one. It just adds a bit more character.

Q: Where do you think Swift will be in five years?

Kyle: Hopefully, Apple will still be evolving the language. What I think will be really interesting to see is where we go as a community. Will we start using different programing paradigms? Will Apple start issuing frameworks in Swift that use new concepts, like generics? Generic view controllers will be super interesting to explore.

Radek: One thing that obviously needs to get better is tooling. Secondly, there are some dynamic features, like reflection, that are really lacking in Swift. I think those points will improve, because in cases where you need those abilities, you have to use Objective-C right now. I would definitely love to see more Apple frameworks in Swift. That might take a long time. This year I think we might see more new things from Foundation.

Jack: Hopefully within five years, Apple will have open sourced Swift. That would be great, and will hopefully happen much sooner than that. One of the interesting things is that Apple has, for years, had Objective-C. It has a certain heritage, because it had to be based on C. With Swift, Apple actually has a great chance to build new things. Right now, we have a multi-paradigm, where we can do functional programming along with the things we’ve done before. Apple can build in even more things that probably no one here has thought of yet, so I’m actually looking forward to this. Apple can really innovate in terms of what a programming language can do.

Q: If you woke up tomorrow as Chris Lattner, what would be the first thing you would do to Swift?

Boris: I would do something about the versioning, which is really annoying at the moment. Right now, if we have a problem in CocoaPods, what happens when Swift 1.3 comes out? Will it be compatible with 1.2? By not having a clear versioning scheme, we don’t know, and so it’s difficult to plan ahead for the next Swift version. I’d rather have more semantic versioning.

Abizer: Do you think there’s a case for them doing a freeze on Swift in the near future, say before five years, and then making the update cycle a lot longer?

Boris: I guess that they would. In fact, I was actually surprised that there were updates to the language between WWDCs.

Gem: I think that some of skepticism is partly on the web side of things, as well as the iOS side. From time to time, people do like to takes sides. You have, obviously, battles like iOS versus Android. I think there are a lot of old-school people who would prefer to stick with what they know, which may be where some of this comes from.

Boris: I have a favorite tweet about this that reads, “No SciFi author foresaw this: we are building clans around languages we speak to the Machine.” So, I think that it really doesn’t make sense to split what is already a small community over what boils down to an implementation detail.

Abizer: I don’t think we’re already split. It may seem like people think Swift is all bad, but I think most people are more pragmatic about it. They use what they can where they can, in the right way. Would you agree with that?

Jack: I would definitely agree with that. Swift lets you do all these cool new things that we all love. At the same time, we have to deal with the real world, which means delivering apps that have Cocoa in them. Cocoa doesn’t have the ability to do a lot of these things. I think that Apple is going to innovate on this quite a lot in the future. Hopefully this summer, we’ll start to see some more APIs from Apple that use Swift in interesting ways. I don’t think Swift-only frameworks will appear for a long time. What we probably will see is existing frameworks, but new APIs that only work from Swift, or work better in Swift. It will be some time before they start locking out Objective-C, but we’ll see things where it will be more and more advantageous to use Swift instead.

Q: If Swift becomes open sourced, what would you do with it?

Jack: I’m not sure what I personally would do with it, but I know that a lot of my colleagues would start using it to build web apps. In the company where I work, we have so many web developers who use Ruby and other things, but who have also become interested in Swift. They can see all these cool concepts and the similarities to Ruby. I think that when, not if, Swift becomes open source, we will see the different web development frameworks that can be built on top of Swift.

Radek: I have had some problems when my code would crash, but it wasn’t my fault. The problem would be perhaps, some bug in Apple’s framework. That is really annoying because you can’t see into it. If Swift is truly open source, it would be great to be able to command-click on something to see its implementation. When something crashes, you could see what the problem actually is. Even though we have an open source Core Foundation, you cannot view it from Xcode when something crashes. So, that would be nice. In addition, people would likely help improve the compiler.

Kyle: I think it would be great for Swift to be open source, because we could finally replace languages. Personally, I have to write in either Python or Swift, so I use Python for command line tools because it works on all platforms, websites, and APIs. I would love to unify this in one language that worked on every platform, which I would expect to be possible if Swift was open source. It would also mean that we could contribute back to Swift. If we found a bug, we could actually fix it ourselves and open a pull request. We could potentially even add new features to the language, which would be really interesting.

Gem: I think that would also encourage more people to start iOS development. Like Kyle said, it would work on every platform, and that would be better for everyone. It also becomes better for Apple, because the more developers they have, the more money they can make.

Abizer: I’d add, perhaps it hurt that Cocoa itself isn’t really open source, but that didn’t seem to stop any development. People still ask for Swift to be open source, and for more of it to be visible, but do you really think it will happen in Swift? It would be nice, but maybe it won’t happen.

Gem: Most web developers that I know have heard of Swift and Objective-C. But, Cocoa doesn’t really mean anything to them. They see that it’s open source, but because they don’t really know about it, it doesn’t seem as trustworthy. Swift and Objective-C seem to be the standards for iOS.

Q: What advice would you give to someone wanting to start developing for Apple’s platforms? Would you recommend Swift, or Objective-C as well?

Gem: That’s difficult. My skepticism is saying, “No, learn both”, but I’m not sure. I still often fall back to Objective-C, because I know how to do it in Objective-C. With Swift, I would have to look at how to do it, and then look at what I broke. To be honest, I would still advise people to try to learn both. At the moment, it is worth the effort to do so. Everyone knows there are certain things that are currently done better in Objective-C. In the future, if Swift keeps going the way it is, I would say to just learn Swift. Of course, it depends on your background as well.

Jack: As recently as a few months ago, in answer to the same question, I would reply: definitely learn Objective-C. That is where all the documentation and most of the examples are. But in the past few months, a lot has happened. There are so many people working with Swift and writing about Swift. Almost any problem you might encounter in developing will likely have a Swift-based answer, on, say, Stack Overflow. If someone doesn’t know either language, I think that it may actually be a better inroad for people to start with Swift. With that being said, I think it’s important for programmers to still learn enough Objective-C to be able to read it. There is so much useful information out there that is still relevant, though it’s written in a different language. It’s important to be able to grasp at least something of that.

Boris: I would say that it makes sense, for the time being, to at least be able to read Objective-C. You don’t necessarily have to write anything in it. Know it for the purpose of understanding all of the information and resources that are out there.

Q: Do you think Swift is ready for pure test-driven development? Is there enough visibility of your production code and your tests to say that you can use it purely in TDD, or do we still depend on mocking?

Kyle: Personally, I don’t think mocks are the answer. You’re just making something that is fake. Instead, you could just test the interface to it, which is another approach. People do TDD differently. For some people, they might require mocks, and for some, they might not.

Radek: I’m not sure about TDD, but as for testing itself, I just wish we had some more dynamic features. In Objective-C, you can swizzle things, which is useful when you want to stop something. I wish you could do things like that in Swift, because often that is the simplest way to test. You can’t do that with pure Swift. You have to do other things that still work, but oftentimes, I find that you have to write more implementation code just for the sake of testing. Testing is something that people want to do when it’s really easy, but not when you have to pervert your actual code just to be able to test.

Q: Do you think Swift will start being taught in universities as an easy language, for writing or for introductory programming on computer science courses?

Radek: My friend is in university in Russia, and I believe he said that they have actually started teaching iOS development in Swift. I’m not sure if that is a good idea, but I’m sure that there are people who already do it. As for using Swift for an introduction to computer science, well, maybe. It might not be the best language, and the big problem is that it is iOS and Mac only. You would need Macs to use it. If it was open source, it might be better.

Gem: For the question of what it would take to teach Swift, we would need people like us to start being teachers. It’s not a profession that people generally look at with a lot of aspiration. If you know teachers, you know how difficult it can be to be a teacher. It might be different in universities, where students typically want to be there. But, it would definitely need developers like us to actually move towards education. I think that is something that people should look at, even if it’s giving a few talks in universities about Swift. These don’t necessarily need to be integrated into the course. We just want to encourage students to look at it in their spare time, show them that it is a possibility, and give them some pointers.

Q: Why do you think Apple made Swift?

Gem: I think that developers might have looked at technology and thought, “There have been nice new products coming out for consumers. What about us developers?” So, my happy theory is that they made Swift as a present for developers.

Kyle: I think it’s about ability. Objective-C really lets us do some bad things. There is no ability to express optionals, which could result in us making bugs. Swift adds a lot to our ability with more type safety. We can catch bugs earlier before we ship our app, which I think is where Apple is trying to go with Swift.

Radek: I think the explanation is on my T-shirt [points to dinosaur], which is that “It’s time, Objective-C!”

Boris: Yes, it’s just a natural progression of things. At some point, you need to replace old technology. Eventually, it has to happen. In five hundred years, people will not program in Objective-C, so it needs to be replaced at some point.

Jack: Chris Lattner first started working on Swift in his spare time. At some point, he must have shown it to his manager, who thought other people should work on it as well. That must have been an interesting conversation at Apple, because as far as I know, Chris was on the LLVM team. He isn’t someone who has been working a lot with Cocoa or building apps within Apple. So, I think that he probably built it with the viewpoint of needing a better language that can do more interesting things. As an Objective-C developer, there are certainly things in the language that I was becoming tired of. Likely a lot of that feedback has reached Apple, and I imagine they were aware for a long time that people were not really happy with certain aspects of Objective-C.

Abizer: I really like the idea of it. I have no idea why they did it, but I was in San Francisco last year when they released Swift. The excitement was actually palpable, and I saw a lot of very shocked faces.

Q: Where do you think we’ll go as a community over the next year? WWDC will likely have many new announcements, so what should people do now?

Jack: I think the main thing to do is to keep track of what happens in new releases of Swift. One of the key points, always, is to look at what Apple puts in their release notes, and what they tell people to pay attention to. Overall, with regards to Apple, they start to push new techniques on people. A year later, if you haven’t started to move towards that, you become stuck, because the old thing invariably goes away. You have to keep on top of things. I don’t think anyone here is at risk of not keeping on top of things, but it’s important to make sure that your colleagues and other people are aware, Swift will only become more prevalent over the years. Some of the things that we are talking about here could end up being part of the Standard Library, like the Result type. This is something that Apple could definitely build into the language, which would be interesting.

Gem: I just want to tell people to build in Swift, then open source what you’ve built so that everyone else can learn. If you do, comment your code. We’re all learning it at the same level, and it has opened the doors for a lot of people. The only way you can keep making Swift and its community better is by opening up what you’ve written so that others can learn from what you’re doing. They can contribute to it, and they can talk to you about it. Going back to the education side of things, go and talk to students. Talk in panels. Give lightning talks. Talk about what you’re doing, which will drive the community forward. I think that everyone has a duty to do that.

Kyle: I definitely agree with the point about open sourcing code, because it really lets the community see how other people are solving problems. I’ve open sourced dozens of Swift frameworks, and if you look at them, you’d see a definite progression of my style within each work. I’ve completely changed how I approach things. For example, I’ve gone from not using currying at all, to currying almost everything.

Q: Without naming your own talk, name your favorite part of Swift Summit.

Jack: For me, my favourite part has definitely been meeting and talking to people, both sharing my views and getting other peoples’ views. This dialogue is especially important because the language and the community are so new. We’re in a position where the people at Apple who are working on Swift are actually paying a lot of attention to what’s happening in the community. We actually have the possibility of helping move the direction that Swift is going in. They’re doing things in response to people complaining about things not being the way they want. The exchange of ideas and discussion has been really great.

Boris: I would say mostly the same thing. Exchanging ideas and talking to people are the most important part of conferences.

Radek: You could talk about an object in the context of Objective-C, but Swift opens up this new world of opportunity. It really works, and we can use it for production. It’s still evolving — and quickly, too. I think it’s cool that the Swift team actually listens, and that we can discuss these ideas to shape the language.

Kyle: Yes, it has been really nice to hear how Swift is working for other people. There are a lot of common problems, and we can talk about how we can solve these as a community instead of as individuals. We’ve learned a lot of new concepts. There have been a lot of great talks, and one of my favorites was Chris Eidhof’s, where he talked about generic functional view controllers. We’re pushing this new language and seeing what we can actually achieve with it.

Gem: To repeat what everyone else has said, talking to people about Swift has been great. In addition, seeing how certain people have been using it, and what backgrounds they come from, all adds to the different viewpoints.

Q: What is the biggest thing holding us back as a community, what stops us moving forward?

Radek: I would say, perhaps, the inertia of Objective-C. Most people coming to Swift come from Objective-C. Instead of learning Swift as a new language, it’s easy to remain in the old mindset. We don’t rethink the way we program, taking into consideration what we can do in Swift, and the things that Swift makes easy.

Boris: I think that, coming from Objective-C, there’s a mindset to never use other peoples’ code, and that third party dependencies are bad. That really has to stop.

Gem: To return to a point earlier, we need to start talking about our code. Start open sourcing it, and let other people see what you’re doing. Talk to them about it. That is what will draw the community forward. This is something that isn’t just for the Swift community, but the entire tech community. The more you open source your code, and the more you talk about it, the more diverse a range of people will start talking about these things. Going to conferences, you’ll see a more diverse range of people, which will be good for everyone.
Abizer: And we’ll stop there. Thank you very much to the organizers of Swift Summit, and to our panelists: Jack, Boris, Radek, Kyle, and Gem!

[crowd applauds]

Get more development news like this

Next Up: Build a Realtime Swift App with Realm #1: Building Reactive Apps with Realm

General link arrow white

About the content

This talk was delivered live in March 2015 at Swift Summit London. The video was transcribed by Realm and is published here with the permission of the conference organizers.

Abizer Nazir, Boris Bügling, Gem Barrett, Jack Nutting, Kyle Fuller, Radek Pietruszewski

Abizer Nazir, Boris Bügling, Gem Barrett, Jack Nutting, Kyle Fuller, Radek Pietruszewski

4 design patterns for a RESTless mobile integration »