Swift, Apple’s in-house developer language, is so easy a CEO can use it. That’s according to Apple CEO Tim Cook, a man apparently ready to roll up his sleeves and code an iOS app.
“You or I could write an app” with Swift, Cook reportedly told the audience at the Goldman Sachs conference Tuesday. To which we respectfully retort, prove it.
See also: Apple Wants Devs To Love Swift, Its Shiny New Language—But There’s A Catch
Apple especially programmed the Swift coding language as a simpler, safer, faster-to-run alternative to Objective-C. Swift integrates seamlessly with the Objective-C language, plus Cocoa and Cocoa Touch, the Objective-C frameworks that drive OS X and iOS applications.
Indeed, Swift is much, much simpler than Objective-C, with syntax that barely appears like English to the average person. Here’s how you would print “Hello, my name is Swift” using the language’s print command:
let name = "Swift" println("Hello") println("My name is (name)")
You can see how it’s a little more understandable than the garbled Objective-C code below:
NSString *name = @"Swift";
NSLog(@"Hello my name is %@", name);
Initial reports from developers confirm that Swift is what it says on the tin. LinkedIn was one of the first companies to launch an iOS app built entirely in Swift, after three months of simultaneous learning and coding.
But while three months is a remarkably short time to master a new language, these are still seasoned developers, not dabblers. When it comes to LinkedIn’s most experienced developers, there’s no “you or I” about it.
See also: LinkedIn Launches SlideShare, An iOS App Built Entirely In Apple’s Swift
Furthermore, Swift can’t stand alone. While it makes a lot of clunky Objective-C functions clearer and more concise, it still relies on Objective-C frameworks. If something goes wrong with a developer’s Swift code, she’ll still need to know Objective-C in order to debug it. Even as Swift grows into its version 1.0 status and beyond, it doesn’t nullify iOS developers’ need to know Objective-C.
In other words, when Tim Cook makes such a statement, he’s betting big on Swift working seamlessly with Objective-C without any hiccups, and wagering that the people in the audience are just as, or more, technical than he is.
Tim Cook, we’d love to check out your first Swift app!
Correction: We accidentally published two lines of C, not Objective-C. See what we mean when we said it was tricky?
Photo of Tim Cook courtesy of Apple