On practically Day 1 of Swift, it seemed clear that the future of the platform would change forever.
I have begun to realize how sweeping that change will be.
Here’s the TIOBE index for Swift, which shows a small, but growing, Swift community:
And here’s the index for ObjC:
See that cliff we’re all hurtling towards?
But TIOBE is a lagging indicator. It measures webpages on the Internet that are about programming languages. But just because there’s a webpage, doesn’t mean people are still reading it. What about the languages people are actually still searching for information about? For that we turn to PYPL, which paints an even scarier picture:
Sometime this year, probably right around now, Swift will surpass ObjC in search traffic. The number of people trying to google some Swift question will be greater than the number of people googling some ObjC question. Around now. Not next year, not when you’re planning your next major version and might have more time to think about porting a few classes. Right now.
In fact, if you go to the raw Google Trend data, the situation is even more dire still: not only did Swift overtake ObjC in search traffic, it happened way the hell back in September 2014:
All this popularity, and Swift only runs on 2 OSes! Let’s not even get started on the amount of gasoline we’re going to pour on this fire when Swift becomes a language for Linux development.
Pretty much every new iOS developer I talk to is learning Swift. Not ObjC. Not Swift and ObjC. Just the Swift.
So is this just people I know, or is it everybody? I think it’s everybody. For example, here is what happens if you try to take the ObjC course at Big Nerd Ranch:
And here is, for comparison, the schedule for just one of their Swift classes. Not even the most popular one.
Put yourself in the noob developer’s shoes. Swift is essentially a superset of ObjC. Other than a few weird trivia questions (
#pragma pack anyone?) you can do everything in Swift that you can in ObjC, and much, much, more. Why would they learn yesterday’s programming language when they can learn today’s?
The application of my warning is this: do a headcount of the ObjC developers in your office. In fact, take a photo. Because never again will you have more ObjC developers than you do right now at your company. If you are very, very, lucky, you might keep all the ones that you have, for a few years.
Do you have job ads for hiring new ObjC developers? Take those down. Because in the time it takes to find a new ObjC developer two more will have left. You think hiring is hard now? You ain’t seen nothing, son.
If I sound apocalyptic, it is because we live in apocalyptic times. There was a time when this scenario was more “Drew’s intuition” than actual data. Now it’s data.
Yes, and so do the COBOL folks. Your ObjC codebase isn’t going to go away. Just the people willing to work on it. Sorry.
The statement that “ObjC is our generation’s COBOL” actually undersells it, I think. Sure, J2EE/.NET replaced COBOL apps. But there never was a language designed specifically to replace COBOL, that used the same standard libraries, the same object model, the same runtime, to share freaking types. There never was a language that allowed you to move out of COBOL a class at a time.
…Swift is that language. And if the road out of COBOL code was a death march, the road out of ObjC is an interstate highway. Believe me, you want to beat the rush hour traffic. Oh, and it’s now 4pm.
Put yourself in their shoes. Their knowledge of ObjC is depreciating almost as fast as your codebase. Of course they’re going to switch. The only question is, whether they switch languages or also switch jobs.
Consider this: did you teach them ObjC? No. They learned ObjC moonlighting at their boring .NET job, and then you hired them. They’re now moonlighting learning Swift, and now you’re the boring ObjC job. See where this is going?
Did you know they still release new versions of COBOL? They’re on 2014 now.
Sure, if your goal is to make a completely CYA decision that probably nobody can fire you for, wait for everybody else to do it first.
On the other hand, if your goal is to have a codebase that you can actually find people to maintain in five years, that will be too late. By the time everybody else is doing it, everybody else will be trying to hire from the same pool of people that you are.
Also, a word to the wise. When people are working on getting out, they don’t talk about it, because they don’t want to start a run on the bank. Is it a coincidence that this blog post is published the same day I pull the last ObjC class out of my own projects? No. No it’s not.
Just because you have not heard of migrations does not mean they haven’t been happening. People are waiting to get out of the burning building before they throw gasoline on the fire.
Page optimized by WP Minify WordPress Plugin