Objective-C vs Swift

Objective-C
Objective-C

3.2K
4.8K
490
Swift
Swift

4.2K
2.1K
1.1K
Add tool

Objective-C vs Swift: What are the differences?

Developers describe Objective-C as "The primary programming language you use when writing software for OS X and iOS". Objective-C is a superset of the C programming language and provides object-oriented capabilities and a dynamic runtime. Objective-C inherits the syntax, primitive types, and flow control statements of C and adds syntax for defining classes and methods. It also adds language-level support for object graph management and object literals while providing dynamic typing and binding, deferring many responsibilities until runtime. On the other hand, Swift is detailed as "An innovative new programming language for Cocoa and Cocoa Touch". Writing code is interactive and fun, the syntax is concise yet expressive, and apps run lightning-fast. Swift is ready for your next iOS and OS X project — or for addition into your current app — because Swift code works side-by-side with Objective-C.

Objective-C and Swift belong to "Languages" category of the tech stack.

"Ios", "Xcode" and "Backed by apple" are the key factors why developers consider Objective-C; whereas "Ios", "Elegant" and "Not Objective-C" are the primary reasons why Swift is favored.

Swift is an open source tool with 48.4K GitHub stars and 7.76K GitHub forks. Here's a link to Swift's open source repository on GitHub.

Uber Technologies, 9GAG, and Asana are some of the popular companies that use Swift, whereas Objective-C is used by Uber Technologies, Instagram, and Pinterest. Swift has a broader approval, being mentioned in 993 company stacks & 541 developers stacks; compared to Objective-C, which is listed in 851 company stacks and 363 developer stacks.

- No public GitHub repository available -

What is Objective-C?

Objective-C is a superset of the C programming language and provides object-oriented capabilities and a dynamic runtime. Objective-C inherits the syntax, primitive types, and flow control statements of C and adds syntax for defining classes and methods. It also adds language-level support for object graph management and object literals while providing dynamic typing and binding, deferring many responsibilities until runtime.

What is Swift?

Writing code is interactive and fun, the syntax is concise yet expressive, and apps run lightning-fast. Swift is ready for your next iOS and OS X project — or for addition into your current app — because Swift code works side-by-side with Objective-C.

Want advice about which of these to choose?Ask the StackShare community!

Why do developers choose Objective-C?
Why do developers choose Swift?
What are the cons of using Objective-C?
What are the cons of using Swift?
    Be the first to leave a con
    What companies use Objective-C?
    What companies use Swift?
    What are some alternatives to Objective-C and Swift?
    Java
    Java is a programming language and computing platform first released by Sun Microsystems in 1995. There are lots of applications and websites that will not work unless you have Java installed, and more are created every day. Java is fast, secure, and reliable. From laptops to datacenters, game consoles to scientific supercomputers, cell phones to the Internet, Java is everywhere!
    JavaScript
    JavaScript is most known as the scripting language for Web pages, but used in many non-browser environments as well such as node.js or Apache CouchDB. It is a prototype-based, multi-paradigm scripting language that is dynamic,and supports object-oriented, imperative, and functional programming styles.
    PHP
    Fast, flexible and pragmatic, PHP powers everything from your blog to the most popular websites in the world.
    Python
    Python is a general purpose programming language created by Guido Van Rossum. Python is most praised for its elegant syntax and readable code, if you are just beginning your programming career python suits you best.
    HTML5
    HTML5 is a core technology markup language of the Internet used for structuring and presenting content for the World Wide Web. As of October 2014 this is the final and complete fifth revision of the HTML standard of the World Wide Web Consortium (W3C). The previous version, HTML 4, was standardised in 1997.
    See all alternatives
    What tools integrate with Objective-C?
    What tools integrate with Swift?
      No integrations found
      Decisions about Objective-C and Swift
      No stack decisions found
      Interest over time
      Reviews of Objective-C and Swift
      Avatar of Bessalitskykh
      Software Development Consultan at MLSDev Inc.
      Review ofSwiftSwift

      The performance of Swift is almost the same as that of C++, which is considered the fastest in algorithm calculation arithmetics. Apple had this idea in mind and worked to improve the speed of Swift. For example, Swift 2.0 has beaten C++ in several computation algorithms, such as Mandelbrot algorithm. Objective-C is slower because it contains C API legacy.

      Swift is faster than Objective-C, because it removed the limitations of C language and has been improved with the help of advanced technologies that were unavailable when C was developed. As mentioned by Apple, Swift was originally designed to operate faster.

      Despite the fact that languages are different, they both integrate, and work with Cocoa and Cocoa Touch APIs, for all Apple platforms. Therefore, a regular app-user would not recognize the difference in operating speed between Objective-C vs Swift. Speed also depends on a programmer’s level and capabilities, since a slow app can be written in Swift as well.

      Learn more here https://mlsdev.com/blog/51-7-advantages-of-using-swift-over-objective-c

      Avatar of Bessalitskykh
      Software Development Consultan at MLSDev Inc.
      Review ofSwiftSwift

      Its performance approaches the one of C++ which is considered the fastest algorithm calculation arithmetics. And Apple strives to improve the speed of Swift. Learn more here https://mlsdev.com/blog/51-7-advantages-of-using-swift-over-objective-c

      How developers use Objective-C and Swift
      Avatar of Instacart
      Instacart uses Objective-CObjective-C

      Basically, the trajectory was we had our iOS app, which started out native, right? It started as a native app, and then we realized you have to go through a review process and it’s slow, and at a very early stage, it made sense for us to make it a wrapped web view. Basically, the app would open, and it would be a web view inside of it that we could iterate on quickly and change very rapidly and not have to wait for app store view process to change it. It wasn’t totally a native experience, but it was as actually a pretty good experience and lasted for a very long time and was up until recently the foundation of our current mobile web experience, which is different from our app situation. So for a long time, basically, our app store iOS Instacart app was a wrapped web view of just our store, a condensed version of our store, which meant that we could add things. We could change sales. We could change the formatting. We could change the UI really fast and not have to worry about the app store review process.

      This all changed about a year ago, I would like to say, at which point it became a totally native app. We felt comfortable enough with the product and all the features that we made it a native experience and made it a fully featured app.

      Avatar of Lawrence Cheuk
      Lawrence Cheuk uses SwiftSwift

      iPhone app, a new born language, it may good but the IDE, xcode is bad compare with Visual Studio. It just like a baby. playground can only use without connect to other library...you can not do a simply refactor of renaming a variable. You can go to definition and find reference, but you can not go to implementation....I should write them on xcode not here basically it is not the fault of swift, but it tightly to it, unless you want to use a notepad to write it.

      Avatar of Refractal
      Refractal uses Objective-CObjective-C

      While the majority of our stack is now using Swift, we still love Objective-C in many cases, especially low-level software manipulation, where it's just easier. It doesn't hurt that a lot of iOS/OS X Libraries out there are written in it either.

      Avatar of SmartLogic
      SmartLogic uses Objective-CObjective-C

      We like to go native with iOS development, and Objective-C has been the only game in town until recent introduction of Swift. We're keeping an eye on Swift, but we aren't giving up on the [old way:to do:things]!

      Avatar of Refractal
      Refractal uses SwiftSwift

      Most of our newer apps are written completely in swift, with our older ones and some special cases using a mix of Swift and Objective-C, but with Swift 2, the language is pretty much a must-use. "guard" is <3.

      Avatar of DailySMSCollection
      DailySMSCollection uses Objective-CObjective-C
      Avatar of Flutter Health Inc.
      Flutter Health Inc. uses SwiftSwift

      Flutter is coded with Swift v.2.3 and can be run with Xcode v.8.2.1. To launch in Xcode 9.3, the code needs to be migrated to Swift 4.1

      Avatar of Maxim Ananov
      Maxim Ananov uses SwiftSwift

      Most of the app code was gradually rewritten in Swift for better performance and code maintenance.

      Avatar of JINJA Ltd.
      JINJA Ltd. uses SwiftSwift

      Our native iOS app is built on Swift, and most of the basic function is still written in Swift

      Avatar of Promethean TV
      Promethean TV uses Objective-CObjective-C

      PrometheanTV provides SDKs for IOS devices including support for the Objective-C language.

      How much does Objective-C cost?
      How much does Swift cost?
      Pricing unavailable
      Pricing unavailable