Investing scant resources (and your time and mind-share are among the most precious you have) in a technology before it has developed a following, third-party support (tools and libraries), a viable user base, and the resources to educate yourself and others is a significant gamble. Sure, you might win. But you probably won't.
Ask HN: If learning to develop for iOS- start with Obj C or Swift?
31–40 of 53 posts
Re: Ask HN: If learning to develop for iOS- start with Obj C or Swift?
#32Anecdotal evidence in favor of Objective-C (Swift wasn't around back then): at an early WWDC, a dev. who was completely unfamiliar with Objective-C finished his first Cocoa application during the "Intro to Cocoa" session, and spoke about his amazement during the feedback. Swift is way more complicated than Objective-C, even if the syntax may seem a lot more familiar if you're used to certain other languages. The reas…
It can be used to do more complex things if you want to do functional programming, but to do the same things in the same way, it is less complicated.
The weakest point is the lack of examples and documentation.
The lack of Linux and windows versions is irrelevant. Although there are open-source implementations of Objective-C, there is no open-source equivalent of Cocoa, so the experience is barely transferable.
You certainly will end up learning a lot about objective-c in order to work with Cocoa, but learning Objective-C first will be a waste of time, since once you know Swift, you will barely ever touch Objective-C.
Re: Ask HN: If learning to develop for iOS- start with Obj C or Swift?
#33I am not an iOS dev, so I apologize if the answer is too obvious, but why did Apple introduce Swift? What's wrong with Objective-C?
Re: Ask HN: If learning to develop for iOS- start with Obj C or Swift?
#34A +10 times WWDC veteran said to me that it usually makes sense to really start using new dev tools and APIs 1 year after their announcement in WWDC. Dev tools have matured enough and the latest OS version has had enough installs to make it worthwhile.
Re: Ask HN: If learning to develop for iOS- start with Obj C or Swift?
#35I am not an iOS dev, so I apologize if the answer is too obvious, but why did Apple introduce Swift? What's wrong with Objective-C?
* be safer and reduce bugs * be more concise to increase productivity * be easier for the compiler to optimize * introduce functional programming constructs to make algorithm development easier
Objective-C is weak in all of these areas.
Re: Ask HN: If learning to develop for iOS- start with Obj C or Swift?
#36To answer your question, it really depends on your goals. If you're looking to write your own apps, and you're not under any time pressure, I'd say start with swift. Apple will push the adoption curve _hard_, they always do.
If you're looking to get a job as an iOS developer in the next year or so, Objective-C isn't going anywhere. Big organizations in particular will not be rewriting their apps from the ground up, and there will be legacy code to maintain for years to come. I know of some big projects that were still avoiding ARC for quite a long time...
No matter what, I'd learn Swift _now_, but if you can spare the time I'd say do yourself a favor and learn both. Objective-C has a lot of great concepts, and they're totally worth learning. And it will make understanding the Cocoa and UIKit frameworks a bit easier as well.
Good luck!
Re: Ask HN: If learning to develop for iOS- start with Obj C or Swift?
#37Re: Ask HN: If learning to develop for iOS- start with Obj C or Swift?
#38Anecdotal evidence in favor of Objective-C (Swift wasn't around back then): at an early WWDC, a dev. who was completely unfamiliar with Objective-C finished his first Cocoa application during the "Intro to Cocoa" session, and spoke about his amazement during the feedback. Swift is way more complicated than Objective-C, even if the syntax may seem a lot more familiar if you're used to certain other languages. The reas…
And sure you can whip together a simple app using all the documentation and tutorials out there for objective-c. But objective-c has a lot of gotchas that make it easy to do bad things as you start to build a larger app. Like retaining self implicitly because of an ivar in a block... Can't tell you how many times that is bitten us.
That being said, have you tried to use Swift with the core foundation framework? Yikes. I spent hours yesterday trying to understand how to simply pass a pointer to a function. The type was something like CMutablePointer?>. Hopefully it'll get easier as the documentation improves though :)
Re: Ask HN: If learning to develop for iOS- start with Obj C or Swift?
#39For me personally, I'd be more concerned about someone in your position trying to learn Swift now because it's an incredibly immature language. Core language-level changes IMO are the hardest to cope with, as they can have a severe impact on code written in a previous version of the language, not to forget how much of a mental cluster-f!#@ it can cause.
Re: Ask HN: If learning to develop for iOS- start with Obj C or Swift?
#40Objective C. When you need to figure something out, and Google returns 1,000 tutorials on how to do it on Objective C and nothing for Swift, you'll know why. Sure, Swift might be better. One day you'll probably learn it. But 99% of the effort in learning Objective C is learning all the frameworks and libraries, and the support to do that is much better in Objective C (at present). If you already know Objective C, and…