Wednesday, June 11, 2014

Widgets

Apple Releases New Programming Language: Swift

Apple’s newly-announced programming language brings a number of benefits, and marks a major change in how developers can build apps for the iPhone and iPad. Before now, Apple has been relying on Objective-C, which was built on the foundation of the venerable C programming language.
Apple’s change is good news for consumers and developers alike. Swift’s introduction has pumped new life into the already vibrant Apple developer ecosystem, and seems poised to spur a new generation of innovative applications.
At its core, Swift is designed to be just that – a fast and easier way for people to build programs for the iPhone, iPad and Mac. The language does away the more complicated trappings of Objective-C, and replaces it with a simplified syntax that’s easier to pick up, but still feels familiar.
It also comes with a number of powerful features Objective-C has lacked, including Playgrounds, a system that allows developers to see how changes to their project affect their end product as they add to and tweak their code. Under Objective-C, developers needed to wait for their project to compile and run before they could test any code changes, which can be a time-consuming process.
One of the interesting features of Swift is that it does away with Objective-C’s emphasis on declaring variable types. Now, developers don’t have to specify in the code whether a variable is a string of text or a floating-point number. The compiler automatically handles the data for them.


A sample of Swift code



What’s more, Swift and Objective-C use the same compiler, so it’s possible for an app to have both Objective-C, C and Swift source code.

The language still has a few rough edges, though. For example, Seattle-based developer Wayne Bishop of Galleries HQ pointed out that Swift allows users to choose whether or not to end each of their code statements with a semicolon (a C and Objective-C staple), and said that could cause confusion.



M.S. Saggoo is a Software Engineer and founder of , a popular  programming news and development blog since 2013.
What can I do for you? I can be found on  and can be reached by email .

No comments:

Post a Comment