Few days at Apple World Wide Developer Conference 2014 Apple released a new Programming language called Swift. Many developers think this one of the most surprising, and yet important announcements apple made. Apple was well associated with the former programming language, Objective-C. Which was first used 25 years ago when Steve Jobs founded NeXT.
Objective-C was built on the top of the C programming language, and In the last few years, and especially after Apple success in the iPhone, Apple kept adding features and fixes to make of Objective-C a modern language like fast enumeration, Literals.
However, due to the popularity that iOS got in the last few years, and the increasing number of developers. Who actually came from different backgrounds, and programming languages, Apple found itself in front of an increasing need to come up with new syntax to make development for its platforms more developer-friendly. People who even code in Objective-C call it the ‘weird language’ (calling a method using square brackets, huh?) [myCar drive];
Swift adapts a new syntax that is familiar to developers who come from a Java or C# background.
However, Swift drops some needless syntax details like semicolons, and adds over with features like REPL (Read Evaluate Print Loop) programming, and with Xcode new feature playgrounds, where you can test an algorithm or a function without actually having to compile, link, run and see if it works, it’s all done at real time while you’re typing your code. Swift also gives additional features to methods, where a method can have more than one return type, in what Apple calls as tuple.
The new programming language undoubtedly give developers more space to do amazing productions with less coding, and more freedom in syntax with less restrictions and without the need to worry about pointers, and safety issues because Swift does all of that automatically for the developer, and make the code more concise, readable, and a lot safer.
Will Objective-C die?
No at all, Apple published all of its new APIs in both flavors (Objective-C and Swift) and developers can choose any of them to use. Objective-C has been in use for more than 25 years, and people got used to it.
Apple is bridging the gap between modern programming and its platforms with a Safe, easy to use, and concise programming language to make development for iOS open for more users. In case you’re looking forward to learn iOS programming I highly advice you to start now, because at this time everyone is a beginner. You can learn Swift from the iBook that apple published here
Just a quick note Swift now supports different languages in variables names. Including Arabic. I tried the following
let س: Integer = 4
and it works 🙂
Jamal Kharrat is a Computer Science Sophomore at Illinois Institute of Technology, with an endless passion in Mobile Development (Objective-C, Swift), Interested in Cultures/Linguistics, Graphic Design, and Technology in general.