Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

In the wake of the Swift announcement, it feels like some 'incumbent' iOS developers are saying 'sure learn Swift but if you want to do iOS dev you still need to know Obj-C' (as opposed to 'sure learn Swift but if you to want to do iOS dev you still need to know UIKit' which I agree is obvious) as a strategy to protect their turf.

Or perhaps it is just words from the wise?



There are several reasons I'd say someone still needs to know Objective-C.

Swift is still half-baked. No, make that quarter-baked. It is not newbie friendly. Vast areas are undocumented, the IDE is even more unstable than usual for Apple, the compiler crashes constantly (I probably crashed it more than a hundred times just in the first week), the standard library is lacking, etc. etc. All of this makes it pretty difficult for veterans to work with. If you're new to iOS, or god forbid new to programming in general, you're going to have an extremely difficult time.

Virtually all the sample code is in Objective-C. Discussions assume Objective-C. The APIs, though translated to Swift, are still rooted in Objective-C. Trying to follow all of this without knowing some Objective-C is going to be tough.

In a year or two, when the language is solidified, then going straight for Swift will probably be viable. But right now, it's a terrible choice for anyone new.

It has nothing to do with trying to protect our turf, and that's rather insulting. I feel no need to protect my turf, because as an arrogant dickhead, I feel secure in the knowledge that I will still be a better programmer than 90+% of the folks out there no matter how much good advice they get. I've never even heard of anyone remotely competent deliberately giving out bad advice to protect themselves.


Beta 3 might be half baked. The array semantics are fixed and it crashes far far less. For the first two betas quarter baked was definitely a fair description.


I think you might be confused. Most professional and experienced iOS developers are working for established startups or enterprises. As such they are dealing with existing Objective-C codebases that they continually add new features to. It's nothing to do with protecting their turf just the realities of working in the industry.

So if you are planning on making iOS development a "career" then learn Objective-C first. If you are creating your own startup or playing around then learn Swift first.


If for no other reason, the sheer amount of Objective-C example code out there is reason enough why having Objective-C literacy is a emphatically a Good Thing.

I've found a fun exercise while learning Swift is to re-write Objective-C examples line by line and see how much terser you can make them. The end result is usually worth it, and when it breaks it's always insightful.


I read those comments as "it's not going to happen overnight." There's a lot of code written in Obj-C that will stay in Obj-C for a while. Many people don't even have time to learn Swift right now, and don't need to.


Hanging around the #swift-lang channel on IRC is very instructive in seeing where the problems of a lot of people that want to learn Swift to start their iOS programming journey. Very rarely do they encounter problems with Swift. They're hitting problems with translating Objc to Swift.

Well there are optionals. I think everyone ran into issues with optionals and syntax.

Protect their turf? If anyone is going to benefit from this its people that already know iOS/OS X frameworks and only need to learn a new language. Arguably, that didn't even mean much when the first iOS SDKs came out years ago.


I'm an ObjC dev and I encourage folks to learn Swift, which I am also doing. The thing about learning Swift and still needing to know UIKit is true - it'd be like learning Rails without Ruby, which you just can't do. The first Swift book did a good job introducing you to the language, but didn't delve in to the reality of UIKit at all, which the second book did fill in on. But there are still places where you have to use an NSDictionary over the fancy new Dictionaries, and that reality is very much still here.

If I were starting a new project tomorrow, I'd still use ObjC. If someone where working for me, I would encourage them to learn ObjC for now. Swift isn't going anywhere, but neither is ObjC, and the path from zero to app is still easier in old ways I think.


Well, I think it is wise at this point to learn some ObjC if you're just starting out with iOS development. If you plan to interface with (and therefore potentially debug) any 3rd party code it will be pretty important to know. Also many (most) iOS examples will be written in ObjC. The bridging between Swift and ObjC will remain important for awhile I'm sure.

So, in my opinion it is words from the wise - I'd still recommended focusing on Swift for experienced developers jumping into iOS development, but understanding the ObjC underlying just about everything one will do in Swift is important.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: