Ask HN: If learning to develop for iOS- start with Obj C or Swift?
21–30 of 53 posts
Re: Ask HN: If learning to develop for iOS- start with Obj C or Swift?
#22Can you wait 6 months to start? How comfortable are you with functional programming and type theory? How comfortable are you with C/C++? How tolerant are you of buggy/constantly crashing software?
In 6 months time the answer will be Swift in my view. It is a better language and has nice strongly typed features to help make robust code.
However at the moment you have to put up with a buggy implementation and a development environment that is likely to crash every 30 minutes or so taking unsaved edits with it (this is not a complaint it is an Alpha/Beta release and the first release). It does make developing more of a chore. Plus the fact that the language may change itself in the coming months (and in places like the arrays I hope it does). Given all that I suggest waiting and doing something else in the meantime.
If you are familiar with C/C++ I would dive in with Obj-C and start getting to know the libraries you will need for your project and you can start adopting Swift when you are ready.
If you don't currently program or are used to dynamically/duck typed languages like Ruby and Python I would try some stuff in something like Haskell, ML or another strongly typed language that will get you used to type theory and how to programme in that sort of strongly typed environment within a stable environment. I think that would make it easy to pick up Swift when it is a little more stable.
If you already have a good background in functional programming but not so much in C/C++ it might be worth braving the instability to use Swift to learn the Cocoa touch libraries and explore. The Playgrounds are very cool but VERY unstable at the moment, maybe there will be a better release tomorrow.
Re: Ask HN: If learning to develop for iOS- start with Obj C or Swift?
#23That's what it'll feel like when you try Swift after learning Objective C.
Re: Ask HN: If learning to develop for iOS- start with Obj C or Swift?
#24Re: Ask HN: If learning to develop for iOS- start with Obj C or Swift?
#25I learned Objective C in about a week (two days of reading, then three more days of trying stuff out). I'm not an expert ObjC hacker, but if you already know C++ and have done a little UI work in something before then you shouldn't have much trouble. Once I got over the hump (mostly weirdness with terminology and window manipulation), the XCode environment feels quite nice, comparable to Visual Studio with the Whole…
I wouldn't say it's a simple transition, even if it is a superset. You can get away with writing a great deal of an iOS app without doing much in C proper at all.
Re: Ask HN: If learning to develop for iOS- start with Obj C or Swift?
#26A +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.
3 years ago: Core data ordered sets looked perfect for my use case and then proved buggy. The kicker was a year later when iCloud managed document integration came along ordered sets were not supported (and they still aren't).
2 years ago: The above iCloud support was introduced and I was probably saved by the lack of support of ordered sets and their use in my code because for the first year iCloud was very buggy and problematic (see numerous blog posts). The major iCloud announcement at WWDC the following year was basically "no new features but we've fixed the bugs and added some testing tools" and they got a big round of applause. Autolayout was introduced (I think) which again excited me but I think my experiments with it in interface builder basically failed so it didn't make it into my app.
1 year ago: iOS7 being introduced encouraged me to adopt Autolayout. At least up until the release of iOS7 and Xcode 5 there were some pretty major problems building Autolayout designs which caused me issues. Even the current release Xcode has some issues that I recently needed to hack the XML file to work around[0].
This year it remains to be seen what level of stability is reached by the release time. At least there is no need to release product with a new design like there was last year so maybe I should be waiting for a more final release before trying Swift but I'm giving it a go. I might even try to release some Swift code in my product before the final release (by creating a framework and including it from Xcode 5) but I'll have to test it well.
[0] http://blog.human-friendly.com/hacking-constraints-in-storyb...
Re: Ask HN: If learning to develop for iOS- start with Obj C or Swift?
#27Re: Ask HN: If learning to develop for iOS- start with Obj C or Swift?
#28Good luck and have fun!
Re: Ask HN: If learning to develop for iOS- start with Obj C or Swift?
#29I learned Objective C in about a week (two days of reading, then three more days of trying stuff out). I'm not an expert ObjC hacker, but if you already know C++ and have done a little UI work in something before then you shouldn't have much trouble. Once I got over the hump (mostly weirdness with terminology and window manipulation), the XCode environment feels quite nice, comparable to Visual Studio with the Whole…
Boy, I considered myself pretty well-versed in C++ (and pretty good at C proper) and looked at Objective C like it was Delphi or something the first time. I wouldn't say it's a simple transition, even if it is a superset. You can get away with writing a great deal of an iOS app without doing much in C proper at all.
Coming from a C/C++ background myself (and Java) I found it pretty straight-forward to learn. It wasn't free, but not too bad either. And I'd argue they've fixed most of the annoying things these days (synthesize was my biggest annoyance, never could understand why that couldn't be automated as it is now).
Re: Ask HN: If learning to develop for iOS- start with Obj C or Swift?
#30Anecdotal 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…
but it does from a swift standpoint ;)