|< Could Apple have improved Objective-C instead of making Swift?||When Swift was first designed, were you only thinking about Apple platforms? >|
Recorded – watch the full episode on YouTube.
Was it ever really a possibility that you might end up with half of folks using Objective-C and half of folks using Swift? Or did you feel increasingly towards launch this is going to be a big thing – that people would move across?
Chris Lattner: I guess a couple of things. Swift took four years of development from the first line of code to when it was launched, roughly, and the feeling about it changed across that time period.
When I first started on it, I think I spent a year, a year and a half, where I was just working on it on my spare time and nights and weekends. And nobody else knew about it, literally. I had no expectations it would do anything. I was just having fun playing with it. Bertrand Serlet [then SVP of Software Engineering at Apple] knew about it, and so he and I would nerd out about it and things like that. But otherwise it was a pet project and I thought it would be fun to build a thing, but it being real was not in risk of happening, let's say.
"Apple correctly takes launched products very seriously. And so the closer you get to that, the more scrutiny you get. And my experience is that scrutiny leads to better products."
But as it slowly gained momentum, as we started putting more energy into it, as more people became aware of it, you get closer and closer to something that could launch, and then that's when it went from being an internal secret pet project to becoming real. Now we're talking about putting real resources into it. Now we're talking about actually publicly launching it. And Apple correctly takes launched products very seriously. So the closer you get to that, the more scrutiny you get, and my experience is that scrutiny leads to better products. I think this is one of the reasons why Apple has such amazing products.
Paul Hudson: Did you think it would fragment the community – that you'd end up with tens of thousands of Objective-C lovers continuing on, and then tens of thousands doing Swift?
Chris Lattner: That was a real concern. The sentiment at the time, you talk about the day before you launch something, you really have no idea how the community will respond. Different people have different theories, and I had the theory and the team working on Swift, and many, many people, had the theory that this will be amazingly successful and popular, and it will be a rough, challenging ride, but this will really help move the world forward, make development more accessible on Apple platforms, all those kinds of good things.
"I would say that it launched, and there was different people with different theories, but in the first week, first month, definitely first year, I think that it became clear that it was going to be a good path to pursue."
But there were also very rational, very senior people saying, look: everything good about the iPhone came from Objective-C. It's a perfect combination of the performance of C and the dynamism of objects and the flexibility of high level API. Nowhere else has there been an application development framework that has lasted for decades, and AppKit had lasted for decades and had been very successful.
It's impossible to argue against it. I think that was very true. I think that, on the other hand people did want something new for the platform and did want a shot of adrenaline in the developer community and something to catalyze progress. And so I would say that it launched, and there was different people with different theories, but in the first week, first month, definitely first year, I think that it became clear that it was going to be a good path to pursue.
This transcript was recorded as part of Swiftly Speaking. You can watch the full original episode on YouTube, or subscribe to the audio version on Apple Podcasts.
SPONSORED ViRE offers discoverable way of working with regex. It provides really readable regex experience, code complete & cheat sheet, unit tests, powerful replace system, step-by-step search & replace, regex visual scheme, regex history & playground. ViRE is available on Mac & iPad.
Link copied to your pasteboard.