Apple Releases New Programming Language: Swift

apple

Apple triggered much buzz among computer enthusiasts when they released Swift, a new programming language to create iOS and Mac OS X apps. The new language is designed to be modern, fast, and easier to learn than the code commonly used today.

The popularity of dynamic and user-friendly programming languages, like Python and Ruby, has grown throughout the developer community in recent years. Swift is estimated to be another step in that direction. Swift is the successor to Apple’s Objective-C, which is what, is currently used to create Mac apps. The new language includes full support of Cocoa and Cocoa touch (the frameworks for iPhone apps and Mac OS X apps, respectively) so apps can be designed for iPhone, Mac computers, and iPads. Apple has been using Objective-C for 20 years, but a company representative stated that it is starting to show its age.

Apple stated that Swift is designed primarily for safety, improving memory corruption bugs caused by multi-threaded coding. Some of those who have experimented with the new code say that it is much easier to read. The computer company said that named parameters are expressed in a cleaner syntax that makes APIs in Swift simpler to maintain and read. Swift has a collection of new features that include generics, functional programming parameters, structures to support methods/extensions/protocols, tuples and multiple return values, and closures unified with function pointers.

Swift, as its name would suggest, is built to be fast. By utilizing the optimized LLVM compiler, Swift code is translated into streamlined native code that gets the most out of modern iPad, iPhone, and Mac hardware. The syntax of the code is designed to be an obvious representation of what you want it perform. The code provides object-oriented features like classes, methods/protocols, and generics. Swift includes a Read-Eval-Print-Loop (REPL) to optimize debugging within a program. While the app is running, developers can evaluate and interact with it, and write new code to see how it works within a script-like environment. Swift is available for learning and use today. Those who want to test the new code simply need to download the Xcode 6 beta.

Apple created the code after extensively researching what developers like, or more importantly, do not like about current programming languages. According to Apple, Swift is the modern programming language for the modern developer. Swift uses the same LLVM compiler that Objective-C currently uses, so programmers can run Swift, Objective-C, and C code, all in the same program.

Swift also has a new feature called Playgrounds, which provide users with live feedback as they code, making it possible to test exactly what is going to happen inside an application. Playgrounds also give complete control of time inside a program so users can see what their code is doing moment by moment. Apple has made a guidebook available to developers on iBooks for Swift, and they will be able to submit applications created by the newly developed language on the day that the computer manufacturer launches OS X Yosemite and iOS 8.

By Andres Loubriel

Sources:
Apple
ZDNet
GeekWire

5 Responses to "Apple Releases New Programming Language: Swift"

  1. Jim Sanders   October 31, 2017 at 12:37 am

    Swift is and probably always will be growing as a language. It is definitely worth learning right now. One never knows but it is possible it will eventually replace Objective-C… that remains to be seen. But it is an accessible language especially for beginning programmers as well as programmers fluent in other programming languages. Many of the paradigms are the same only with different syntax. Speaking of the syntax it does rapidly change as Apple is always ameliorating the language. However, the incremental changes do not create an insurmountable barrier of any kind. Swift is most likely the future of iOS mobile.

    Reply
  2. Robert Smith   March 28, 2017 at 4:21 am

    Swift is a general-purpose, multi-paradigm, compiled programming language developed by Apple Inc. for iOS, macOS, watchOS, tvOS, and Linux. Swift is designed to work with Apple’s Cocoa and Cocoa Touch frameworks and the large body of extant Objective-C (ObjC) code written for Apple products.

    Reply
  3. Fedrick Hayward   July 3, 2014 at 3:34 am

    Great move by Apple. With Swift poised to enable developers to work more quickly on their apps, now Apple can expect to see more developers writing code for its platform. Here is everything you need to know about Swift => http://bit.ly/1mb71d3

    Reply
  4. navi   June 26, 2014 at 1:15 am

    Swift is very awesome language at first look! I am italian but the documentation of this language is in english only, so i have found this guide in italian language! http://www.programmareinswift.it !

    Reply
  5. saurabh sharma   June 16, 2014 at 4:31 am

    gud language…

    Reply

Leave a Reply

Your email address will not be published.