Welcome to the Treehouse Community
Looking to learn something new?
Paul Brazell14,371 Points
Objective-C vs Swift
I am interested to know which is the better language to learn in terms of employment. I have started learning Swift and I am about halfway done with the course, and I really enjoy it, but when looking into job opportunities, a lot of them are wanting Objective-C developers. I really like Swift and that would be my language of choice if I was going to look first into doing freelance/develop my own apps, but I probably would have a better chance of making a good career out of programming by at least first starting with an organization.
So, is it better for me to continue my Swift 2 courses and then learn Objective-C afterwards? Should I pause Swift for now, learn Objective-C, then pick Swift back up as an extra skill? I want to have the skills employers are looking for, but I also don't want to spend a ton of time learning a language that will be phased out. Any advise?
Nathan Tallack22,158 Points
To reach a decent level of competency in Swift for iOS developement, you can't avoid learning enough Objective-C to consider yourself at least an "advanced beginnner" of Objective-C.
The reason for this is quite alot (read: almost all) of Apple's refrence materials for the various frameworks and librarires you will use are written with Objective-C code being exampled. So you will find that if you do not recognise the syntax and design principles of Objective-C the value you get from the refernece material is greatly reduced.
That being said, the learning curve is quite small. I knew only the basics of C when I learnt Swift, and then taught myself the basics of Objective-C (both through treehouse coursework and through external refrences) so that I could better understand Apple's reference materials for their frameworks and libraries.
I now know enough to read Objective-C. Sometimes I come across some syntax or design practices that I cannot immeediatly comprehend, but with a little effort I can get there. Once I know what is being done it is a simple matter for me to translate that into Swift for my code.
So, for work that you will be the original author of, you could get away with knowing just the basics of Objective-C and reading what needs to be read in order to translate that to your Swift projects.
For work that you will be colaborating on however, the story is totally different. You cannot contribute effectivly to a team project if everyone on the team is coding in Objective-C and you are coding in Swift. It would create risk from both sides of the fence, with you maybe not understanding or supporting the Objective-C source code and your associates maybe not understanding or supporting the Swift source code.
So, in summary. If you are coding your own original work or you are working with others who are coding in Swift, then you could get by with just a working basic knowledge of Objective-C. But if you are coding with teams that are already developing in Objective-C then you will need to be quite competent in Objective-C.
I hope this helps. :)
Learn both, of course :) If you're forced to choose one though, then you have to prioritize your goals; set aside the employer/freelancer dilemma for a sec. What matters is whether you are going to ultimately be working on brand new apps or updating an older codebase. If it's the latter, then learn Objective-C; there are so many codebases out there that are written in Obj-C that the language won't be useless for quite a while. If it's the former, then learn Swift. Why? Because, Obj-C is dumb; like if I saw it on the street I'd beat the shit out of it for being so dumb. And Swift, in contrast, is soooo f***ing sexy. And like you said, it's hear to stay.