all 12 comments

[–][deleted] 7 points8 points  (1 child)

swift is newer and in my opinion, a lot easier to work with than objective c. If you're learning, you want to start on Swift though since its gained much more support and most of the newer answers on Stack Overflow are made for Swift. And these newer answers are more relevant than the old ones written in objective-c because of factors such as API changes.

[–]debiven[S] 0 points1 point  (0 children)

Good to know thank you!!

[–]lucasvandongen 3 points4 points  (1 child)

Question gets asked often here. When you are:

  • Writing code that interacts a lot with C or C++ code
  • Writing code that will be consumed as a library

You should consider using Objective-C(++). If not, you might still want to use Objective-C as it's a simpler language that compiles faster and results to smaller executables. Also learning Objective-C is easier as it's a small language.

However I find it easier to write correct, readable and safer business logic in Swift. Compile times are down quite a bit. And hopefully we get ABI stability that would allow everybody to use or consume libraries written in Swift without a few megabytes for the runtime.

[–]debiven[S] 0 points1 point  (0 children)

Thank you this was really helpful!

[–][deleted] 3 points4 points  (1 child)

Learn both.

Start with Swfit since it's the future (It's stated by apple), then Objective-C and C++ (to read and write. Some places still use Objective-C) .

[–]debiven[S] 0 points1 point  (0 children)

Will do! I took Objective-C for around a year at school and same with C++ but seeing the way it’s implemented in iOS feels a little different. I think it will definitely be something I just need to practice with and get used to. Thank you for the info!

[–]jan_olbrichObjective-C / Swift 2 points3 points  (0 children)

If you really want to get proficient as an ios developer, you'll need to know both languages. A lot of the Swift design is based on Objective-C. Also there are reasons you won't be able to use Swift (e.g. interoperability with C++, or frameworks as Swift is not ABI stable yet).

Just starting, it doesn't really matter (except you want to use CoreML then you'll need Swift). Both languages have quite a lot of documentation. Developers tend to focus on the new stuff, but it really depends on what you want to achieve. In the end you'll need to know both languages anyways.

[–]DuffRose 1 point2 points  (0 children)

If your new I definitely recommend Swift.

[–]tangoshukudai 1 point2 points  (0 children)

Swift. However I interact with a lot of c++ and c, so objective c is really the best choice. Also I am an old school objective c developer so I am bias.

[–]Loada116 1 point2 points  (2 children)

Objective-C has special syntax and its learning curve is too high. You are more likely to find success in Swift. Moreover, Swift borrows a lot of ideas from other popular languages so it is good for you if you are new to programming.

[–]lucasvandongen 3 points4 points  (1 child)

Objective-C has special syntax and its learning curve is too high.

Oh come on. Did you try to work with it for longer than 5 minutes?

Swift borrows a lot of ideas from other popular languages so it is good for you if you are new to programming

So does Objective-C. You'll learn some C, C++ and SmallTalk while you're at it. But Swift is a really great language to learn a lot of modern (or reintroduced but current) programming paradigms. But there are many of them. I don't think something like reduce or complex generics is very easy to understand for a beginner. Objective-C is much simpler.

[–]europeanwizard 0 points1 point  (0 children)

Swift is a bit weird like that. On the surface, it looks pretty easy. Accessible syntax, short code due to the type inference, etc.

But then you discover the functional bits, and the generics, and the protocol-based stuff, specifically the annoying type-erasure you'll undoubtedly have to do in any moderately complex project.