Looking at Swift and what Steve Jobs said about increasing programmer productivity
Apple this week introduced Swift, a new high-level programming language meant to usher in a new future for iOS development. While there are a number of great facets to Swift, one of its more frequently cited benefits is that the syntax is much more approachable and readable than Objective-C. What's more, Swift promises to let developers create powerful apps with less code, making for a more efficient development process.
To illustrate this, there have been no shortage of code snippets posted online which match up Swift code against Objective-C code. For instance, developer Jordan Clifton earlier this week posted a few examples which make the point rather emphatically.
NSArray *myArray = [[NSArray alloc] init];
let myArray = String();
Creating an array with items also looks quite different:
NSArray *myArray = [[NSArray alloc] initWithObjects:@"one", @"two", @"three", nil];
var myArray = ["one", "two", "three"];
The unveiling of Swift and its myriad of features brings to mind a blurb about programming Steve Jobs once made during a Q&A session at WWDC 1997.
The way you get programmer productivity is not by increasing the line of code per programmer per day. That doesn't work. The way you get programmer productivity is by eliminating lines of code you have to write. The line of code that is the fastest to write, that never breaks, that never needs maintenance is the line that you never have to write. The goal here is to eliminate 80% of the code that you have to write for your app. That's the goal.
Video of the unscripted Q&A, which is well worth watching in its entirety, is viewable below. The pertinent portion of the video begins at 40 minutes and 50 seconds.
Subscribe to Newsletter
Software Updatesmore updates
- Fantastical 2.1 for iOS adds new snooze, search and notification features
- ExpanDrive 4, more services and faster sync
- Apple adds iTunes Extras to Apple TV
- Spotify updates with new iPhone controls in time for summer BBQs
- iTunes U update will bring course creation and student discussion to iPad app
- Dropbox for iOS update adds new setup and file management options