Get the latest news, exclusives, sport, celebrities, showbiz, politics, business and lifestyle from The VeryTime,Stay informed and read the latest news today from The VeryTime, the definitive source.

What is the Swift Programming Language?

20


Swift is a new programming language announced by Apple at the 2014 Worldwide Developer's Conference. Billed as "Objective-C without the C", Swift is designed to run side-by-side with Objective-C and uses the same compiler. However, Swift is a modern language that reduces the overhead of Objective-C and reduces debugging by creating programming structures that are more resistant to common errors. Swift will be used to developer iOS and Mac OS applications and runs inside the Xcode development platform.

While billed as "Objective-C without the C", Swift bares similarities to other C-based programming languages like PHP. The basic structure of the language will be immediately recognizable to C developers, but the amount of code needed to develop applications in Swift will be greatly reduced compared to Objective-C.

Review: Corona SDK for iPhone and iPad Development

One unique aspect of Swift is the interactive playground that allows Swift code to run while the developer types the code. This gives the developer instant feedback, allowing them to see the results of data manipulation on the fly without the need to compile and run in a simulator environment.

Swift is integrated with Cocoa and Cocoa Touch. Apple claims Swift code runs substantially faster than standard Objective-C code, which should allow apps developed with Swift able to perform more complex tasks than seen in previous apps.

Swift Code Example:

var myFirstString= "Hello World!"

println("My first program is \(myFirstString)")

Two interesting things to note in the standard Hello World code example are the lack of semi-colons used to end a line of code and the syntax for inserting the value of a variable within a string.

The backslash-parenthesis structure also allows computation, so values can be added together withing the parenthesis.

Information about the Swift programming language can be found in iBooks. "The Swift Programming Language" is a free programming reference guide from Apple.

How to Develop iPad Apps
Source...
Subscribe to our newsletter
Sign up here to get the latest news, updates and special offers delivered directly to your inbox.
You can unsubscribe at any time

Leave A Reply

Your email address will not be published.