Programming at the metal
So all this c-types has me thinking about developing iOS apps directly after prototyping in Pythonista. So I need opinions. Swift or objective c. I've programmed in everything from COBOL to c++. I learn most languages by starting on a big project that forces me to explore the whole of the language. Before I start buying books I want some insights.
Do you own a Mac? If so, just go with Swift v1.2 which is Apple's stated direction, is more modern, and will be easier to learn than Objective C. Apple is giving Swift books and videos, etc. away for free. The XCode development environment is also free. You would need to invest your time to learn Swift.
What I have been dreaming about is that @omz would release a
Swiftistaapp that would be a great Swift IDE that would allow us to develop native iOS apps right on our iOS devices.
@polymerchm I agree on Swift v1.2. It would be time better spent to learn the intricacies of Swift, than those of Objective-C (although the former might change more in the near future). On the other hand, if you are already familiar with the particulars of C and C++, you basically just have to learn to accept the Objective-C syntax for message passing, object initialization, and method definition, to be able to understand most sample code out there. That could be a useful addition. The rest of the work is learning the frameworks, and they are the same (apart from slight naming differences).
@ccc I think one of the longer term goals with Swift is to enable it to be used as a safe scripting language as well. I wouldn't be surprised if something like Swift Playgrounds shows up on iOS within a year and a half. Nothing prevents Apple from enabling development of real full apps on iOS either, as long as you are a paid member of the development program. (A relatively high fee is required to maintain the mutual benefits of the App Store.)
As a long time C/C++ developer (23 years professionally), I found Objective C to be obtuse and hard to learn. I've used it, I've built apps with it for iOS (including one that is still available in the App store, although it's no longer written in Objective C), and I still find that every time I go back to it after any kind of break I have to relearn everything again.
Conversely, Swift seems more like a nice hybrid of C and Python, at least after reading the initial documents from Apple. While reading the docs, it all made sense to me (I've never been able to say that about Objective C, even while I was using it constantly), and I think I could be up and running with it in a matter of days.
However, I have not actually tried to use it to build an app using Swift yet, so I can't speak from any real experience.
My opinion: don't bother with Objective C, go straight to Swift.
I agree. Am starting out slow. Do you have to pay Apple the $99/year to be able to upload to the iPad/iPhone for personnel testing?
@polymerchm: Unfortunately, yes, you do.
I'm sure this is all spelled out at Apple's Developer portal somewhere, I just don't know where off hand.
From what I recall, XCode is free, and you can use the device simulator for development (it's not bad, and fine for prototyping and early testing). You just won't be able to put it on an iPhone/iPad/iPod/iWatch/iWhatever until you cough up the $99 dollars.
But it's been quite a while since I signed up, so it may have changed (or I may be remembering it wrong).