Apple introduces simplified programming with Swift

SwiftIconToday Apple has introduced a new programming language it has called Swift (not to be confused with the Swift language for parallel scripting), which is intended to be a modern and easy to use language that avoids the complexities in XCode, and allows for quicker application development.

While Apple has progressively simplified programming with its developer tools and extensive documentation, XCode and application development still has a learning curve (the steepness of which is a subjective measure), which may be offputting to those who have other options for scripting and application development.

Even with seasoned logic and data manipulation skills in higher-level programming and scripting languages, you may find yourself frustrated by some of the nuances in XCode, especially if you are simply interested in getting your logic working, without having to manage syntax and the potential for odd memory errors.

With Swift, Apple’s intent is to do away with the need to track memory usage and worry about too much syntax, and instead get down to the logic of programming. The language is built to be safe and manage memory automatically, and also include simple variable declarations and full unicode support, so you can store values in standard English variable names, as well as use Chinese characters, or even emoticons if you wish.

Swift in OS X

Apple’s Swift programming interface allows you to code and preview your results, quickly developing your ideas without too many hoops to jump through (Image credit to Apple — click image for larger view).

Swift is built to work with Apple’s Objective-C programming language, so it should still integrate well with current Objective-C projects, but simply edges coding for OS X to a slightly higher-level, allowing people with coding experience to punch out programs quicker.

Prior to Swift, for this functionality you had to use a third-party solution like Matlab, Octave, or Processing, which often had performance issues since they required the use of a third-party runtime like Java in order to function. These were also less stable since the runtime had to be maintained by other developers and might run into problems when you updated your Mac. With Swift, the program will compile natively using Apple’s LLVM compilers, and be ready to launch and run directly on your Mac, without requiring any third-party software.

Swift should be a welcomed addition to Apple’s programming tools, and fills a gap that has existed in the programming and scripting options that Apple has made available for OS X users. For the average user, there is Automator that allows you to run a few tasks. Gaining in complexity, there is AppleScript that implements with third-party programs which support Applescript, and allows you to manage more logic and flow control. After this there is the new Swift language that is far lower-level than AppleScript, but which has been organized to be quite simple to use. Finally, there is Objective-C and other languages that are supported by XCode.

Hopefully with Swift, those who have programming experience but who do not wish to tackle XCode will be able to get projects done on their Macs.

For more information on Swift, you can check out Apple’s introduction to the Swift language.

One thought on “Apple introduces simplified programming with Swift

  1. B. Jefferson Le Blanc

    The reception at the WWDC keynote for Swift was enthusiastic, but we may know more after the developers have attended some sessions on the subject and have a chance to get their hands dirty, as it were.

Comments are closed.