I’ve worked with programming languages that were still in their infancy. I’ve written about it. TypeScript turned out to be a really great language, but I spent more than half the time I worked in it at or below 1.0. Being on the bleeding edge was cool, but worn pretty tiny pretty quickly.
So it’s probably of no surprise to discover that all my current iOS development efforts have been focused on Objective-C.
I could be wrong I could right
I know that in the long term, I’m almost certainly on the wrong side of history. I don’t think this would be the right choice for everyone. I’m just saying that I believe it is the right choice for me right now.
For me a lot of things stand about about Objective-C over Swift. As of today there is more production code in the wild written in Objective-C than there is Swift. It’s had a 30 year head start after all. Sure the tide is changing pretty quickly, but the expansive array of libraries/frameworks and tooling that exists is immense and not something to turn your nose up at. As well as anything else; the community is large and I believe there are a lot of really great people I could learn from.
If at any stage in the future I wanted to persue iOS development in a serious way, like working with a team. There is a high likelihood/possibility that a real companies iOS code base will be 99% Objective-C based. It takes a long time for teams working on business critical applications to do something dramatic like switching programming languagues. There are inheret risks to a decision like that.
A bit of research will find that there are nices way of bridging code across the Objective-C/Swift gap and I’ll definitely be exploring that in my own projects on this blog.
iOS The Hard Way
A big factor for me and learning Objective-C over Swift is I feel, rightly or wrongly, that Swift will likely be easier for me to learn. It has more modern features/syntax that is familar and similar to languages I’ve used in the past. Where as Objective-C is a bit of a departure. The unusual veener hide a familiar OOP language, but I feel the learning curve for me is higher. I know that it’ll serve me in the long run to learn it now and work with it now while I wait for Swift to mature just that bit more, and for the community/tooling to come along just that bit more.
Conclusion
"But really the most imporant things you can do is to learn how the Apple APIs work. Once you do that, the language you write in is just syntax and highlighting."
This is a pretty short post. It’s a clear enough decision for me right now. But if you’d like to hear what someone who has more experience has to say about it, watching the above video by iOS engineering Eric Miller.
References
Title Image
- Title image is based on the image “Which Way Now” by Flickr user Nick Page.
Links
- Ask A Dev - “What should I learn first, Objective C or Swift?”
- My post on “Understanding Technical Debt”.
- My post on “Looking Back Over Two Years Of TypeScript Development”
- Medium article “Swift + Objective-C: Interop From the Front Lines” by Jordan Morgan