Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Learning to code on iOS - swift vs Objective C dilemna [closed]

I have just finished a year of university and learnt how to write nice applications with C++, OpenGL and Qt.

I was just about to start learning Objective C and Cocoa. This seemed optimal to develop iOS & Mac apps since Objective C was, like C++, a variant of C, Cocoa would allow me to make nice UIs and I could continue using my good OpenGL knowledge to do 3d graphics.

However, Apple has recently announced that many things are changing. Most importantly, they have announced that there is a new language called "Swift", and that they are replacing (from what I understand) OpenGL with "Metal"

My question is, taking into account the lack of good books/comprehensive tutorials (I had found a great one for Objective C and Cocoa).
At this stage, should I wait for the release of XCode6 and iOS8 in fall, along with what I hope will be new books and tutorials on learning this new language and do something else in the meantime to avoid learning a defunct language, or should I learn Objective C anyway and then learn Swift when it comes out (and all these new things like Metal etc).

Is it worth deepening my OpenGL understanding in light of all this new stuff being announced?

like image 307
alexbcg Avatar asked Jun 03 '14 23:06

alexbcg


People also ask

Should I learn Obj C or Swift?

If you want to get work done, Objective-C is the way to go. Swift is the new kid on the block, but it's still a kid. If you want to get work done, Objective-C is the way to go. At the time of writing, Apple's software development kits are primarily written in C and Objective-C.

Is Objective-C still used for iOS?

Most of the core iOS and MacOs software is still written in Objective-C, though Apple is pushing for new updates to be written in Swift.

Which is the better option for the iOS app Swift or Objective-C Why?

Swift has better memory management features than Objective-C, which can help improve performance. It uses lazy initialization, reducing memory usage since unused variables do not initialize—making it faster, easier to read and write, and safer.

What are the benefits of Swift over Objective-C?

With Swift, you can compile, and fix the errors while writing the code, which is not possible with Objective-C. As a result, Swift works better and faster compared to Objective-C when it comes to bug testing. All this gives reason to consider Swift as a safe and secure programming language.


1 Answers

I would advise learning Swift. It is proving to be popular, and there are some tutorials out already, such as this one (http://ios-blog.co.uk/tutorials/developing-ios-apps-using-swift-part-1/). Learning Objective-C will probably only be useful for a couple months, as Apple will probably push Swift as the main language. You can also get a good tutorial book by Apple on the iBooks store for free. Also, if you are a registered developer, you can get Xcode 6 and ios 8 now.

like image 129
mginn Avatar answered Oct 06 '22 00:10

mginn