After the most recent WWDC, most iOS developers aren't talking about cool new iOS 8 features or APIs. Instead, they're talking about a whole new language: Swift. Yes, you heard right - a whole new programming language. How exciting it is!
Apple has been working on Swift secretly for a few years. It is a modern programming language that takes the strengths of other popular languages (for example, Python) and avoids the bad things about Objective-C (for example, poor manual memory-management and awful block syntax). As Apple declared, it’s Objective-C without the C. Not only this, Swift is also able to access the Apple Cocoa Touch framework and share the same LLVM compiler as Objective-C, so they can be seamlessly mixed in a same project.
Now you might be just like me, wondering why Apple would introduce a new language for iOS and Mac OS programming. Let’s walk through some most exciting parts of Swift to see if we can find a reason.
Problem solving is a major aspect of software development, there are often many different solutions to a problem and a good developer will strive for the most simple without compromising maintainability. However, there are certain times when there’s simply no elegant way to solve a problem so you end up writing what’s commonly referred to in the industry as a hack. You probably won’t be proud of it and you might even have committed the code under a pseudonym so no one can git blame you, but however ugly, the hack still solves a problem and the next thing you know, you’re being asked to write a blog detailing its every hideous crevice.