Live data from Hacker News

Ask HN: Swift or Objective-C?

news.ycombinator.com

11–20 of 27 posts

Re: Ask HN: Swift or Objective-C?

#11
post #8

Earlier quoted context omitted.

What do you feel is the primary or greatest benefits of using swift? I get it is the new way but is it that much more productive, easier, flexible or?

Safety and builtin encapsulation. No more included properties in inplementation files. :-).

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.

Re: Ask HN: Swift or Objective-C?

#13
post #2

Swift for new stuff.

What do you feel is the primary or greatest benefits of using swift? I get it is the new way but is it that much more productive, easier, flexible or?

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?

#14
post #8

Earlier quoted context omitted.

Safety and builtin encapsulation. No more included properties in inplementation files. :-).

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.

I prefer Objective-C syntax ;-) that's why I chose to learn it after Ruby's "odd" syntax and quirkiness.

Re: Ask HN: Swift or Objective-C?

#15

I think when Big Nerd Ranch decide it's time to move to Swift, then it's time to move to Swift. https://www.bignerdranch.com/we-write/ios-programming/

But their motive is to sell books and lessons, not necessarily code that works in a production environment.

Re: Ask HN: Swift or Objective-C?

#16
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?

#17
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?

#19
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?

#20

Both. You have to know both languages to develop iOS apps in 2016.

No you don't. You can make all your apps in Objective-C.

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.

Post reply on HN