Re:Ask HN: Swift or Objective-C?
by sparky_ on Tuesday January 12, 2016 @08:55PM
(#10891832)
I'll take the counter-point here and vote for Objective-C. Swift has not reached a level of maturity that we're comfortable with it for mission-critical code. Each Xcode revision brings breaking changes which require you to address manually, as the migrator is lacking. Interop with Obj-C works OK - not great - but with pure C, it's a hassle. And the libraries and tools around Swift are just nowhere near as mature as they are for Obj-C... even first party; case in point, Xcode cannot even rename methods or extract constants from Swift code. No refactoring capability at all.
Having built several large apps which are live in the Store in both languages, I'm sticking with Obj-C for 2016. Give Swift another year before going all in.
Re:Ask HN: Swift or Objective-C?
by jefflinwood on Tuesday January 12, 2016 @11:22PM
(#10892312)
Learn Swift now, and then Objective-C later.
I think one of the biggest misconceptions with the migration to Swift is that it will be a lot easier to be an iOS developer with no experience. After teaching new to programming students iOS development with both Objective-C and Swift, the actual syntax mattered very little - the underlying iOS APIs were difficult to understand.
You'll still find that many API tutorials are written with Objective-C, so even if you don't code in that language, you'll need to translate in your head as you read how to hook up X or Y to Z. In addition, a lot of stack overflow questions for common iOS programming questions are in Objective-C, so you'll at least need to know how to read it.
Re:Ask HN: Swift or Objective-C?
by npalli on Tuesday January 12, 2016 @11:30PM
(#10892325)
Your choice is quite clear as of Jan 2016. Almost all of the latest tutorials/books/online courses and other learning material have moved to Swift. So, if you are looking to develop for iOS 9 and Xcode 7 and above it is Swift.
Even if you wanted to learn Objective-C all the good versions of learning materials are at iOS 7 and below. Not a good choice since it is very likely none of that stuff works cleanly anymore. So, go with Swift. Yes, you will need to be familiar with Objective-C on an as needed basis, but if you learn Swift and iOS programming it will be a translation and not that bad.
Re:Ask HN: Swift or Objective-C?
by adomanico on Wednesday January 13, 2016 @12:56AM
(#10892541)
The majority of companies still have code bases with a ton of Objective-c code. The company I am currently working at has an approximately 30% Swift code and we have been writing Swift since 2.0 went live.
The reality is if you can't be proficient with Objective-c no one will hire you at this point. The more time passes, the more Objective-c code will become legacy, and the less important this will be.
That being said definitely start with Swift. It is an excellent language and is the future of the iOS platform.
Re:Ask HN: Swift or Objective-C?
by NSHippie on Friday January 15, 2016 @09:41AM
(#10909543)
Q: What made most developers fear iOS Development? A: Objective-C. Then there were programmers who spent countless hours learning Objc, these objc programmers will always tell you to use objc and not Swift. Apple, introduced swift because it is the future. Learn swift, once you know swift and you are comfortable with iOS Frameworks you can easily transition to objc.
Re:Ask HN: Swift or Objective-C?
by autoreleasepool on Wednesday January 13, 2016 @08:28AM
(#10894075)
If you want to be technically correct, you can make all your apps exclusively in Swift too. The fact is most large projects are already using both. The trend for new code is to be written in Swift.
At the very least, your need to be able to reason about both languages. Refusing to learn one of them is a disservice to yourself as an iOS dev IMO. Denying that would be silly. If you haven't taken a look at Swift, there is no better time than now to start.
Re:Ask HN: Swift or Objective-C?
by abatjarg on Friday January 15, 2016 @11:00AM
(#10910054)
I think it really depend on your level of knowledge. If you are just starting out then I would start with Swift as it is easier to learn and most new learning materials are in Swift. Once you get the hang of the API and Swift, you will eventually have to learn Obj-C.
Re:Ask HN: Swift or Objective-C?
by GoldenMonkey on Tuesday January 12, 2016 @09:36PM
(#10891993)
Besides a better syntax, and more verbose, what is the win here? Functional Programming could be it. A different programming paradigm for productivity.
Re:Ask HN: Swift or Objective-C?
by robgibbons on Tuesday January 12, 2016 @09:24PM
(#10891960)
Not to mention verbosity, and ease of reading and writing. Its syntax is so much less dated. As far as programming languages go, Obj-C definitely "feels" as old as it is.
Having built several large apps which are live in the Store in both languages, I'm sticking with Obj-C for 2016. Give Swift another year before going all in.
I think one of the biggest misconceptions with the migration to Swift is that it will be a lot easier to be an iOS developer with no experience. After teaching new to programming students iOS development with both Objective-C and Swift, the actual syntax mattered very little - the underlying iOS APIs were difficult to understand.
You'll still find that many API tutorials are written with Objective-C, so even if you don't code in that language, you'll need to translate in your head as you read how to hook up X or Y to Z. In addition, a lot of stack overflow questions for common iOS programming questions are in Objective-C, so you'll at least need to know how to read it.
Even if you wanted to learn Objective-C all the good versions of learning materials are at iOS 7 and below. Not a good choice since it is very likely none of that stuff works cleanly anymore. So, go with Swift. Yes, you will need to be familiar with Objective-C on an as needed basis, but if you learn Swift and iOS programming it will be a translation and not that bad.
https://www.bignerdranch.com/we-write/ios-programming/
http://www.h4labs.com/dev/ios/books
The reality is if you can't be proficient with Objective-c no one will hire you at this point. The more time passes, the more Objective-c code will become legacy, and the less important this will be.
That being said definitely start with Swift. It is an excellent language and is the future of the iOS platform.
At the very least, your need to be able to reason about both languages. Refusing to learn one of them is a disservice to yourself as an iOS dev IMO. Denying that would be silly. If you haven't taken a look at Swift, there is no better time than now to start.