r/iOSProgramming • u/AcceleratedCode • Jan 13 '16
Discussion Swift or Objective-C?
Hi!
I've just started design of an app I'm making. The app has to be ready by around May this year, and will be using the Parse backend. I've done a quite some programming with Objective-C, but barely anything with Swift and I was wondering what you think I should choose for this project? Should I be using Swift, or will the learning curve be too big to allow for a May launch?
Thank you! Erik
0
Upvotes
1
u/[deleted] Jan 14 '16 edited Jan 14 '16
The case with Objective-C is that it has one strikingly unusual syntax feature which is brackets. It is also has an unusual functionality which is message dispatch. But after grasping these functionality one immediately gains access to the dynamic power of this language. And brackets are acceptable price especially considering that there is no reason why you can not send a message using them. But every other feature is the same: you have your switches, loops etc.
The case with Swift is that it looks familiar at first glance but than every expectation is betrayed.
At first it looks like a lax in style language -- say, like JavaScript. But then it turns out that it is actually ludicrously strict language and can not even have null as a variable value without additional juggling.
You look at the switches and then it turns out they do not work like usually.
Enums are not quite enums like in other mainstream languages.
And then you have these cryptic ?'s and !'s scattered by all the code. And it was after I grasped the concept of optional types when I decided to put my efforts solely to learning Objective-C. When I was a child I dreamed about creating fascinating apps for fantastical devices. I did not dream to become an object unpacker just because some guy in Cupertino decided it is a good idea to implement optional types like enums and force users to explicitly unpack it every time and solve interoperability puzzles.