Why Apple's Swift might be the new BASIC, and that's no small thing

Summary:Swift has the potential to both revolutionize professional app development, while at the same time opening the door to more recreational and educational programming. If Apple can pull it off effectively, it will be something special.

Image: CNET/CBS Interactive

At Monday's WWDC, Apple made many announcements regarding the future of OS X and iOS. Perhaps the most interesting (and possibly most far-reaching) of these announcements was the surprise introduction of Swift, a new programming language and environment for iOS development.

If Apple can super-charge execution speed while making development much more interactive, that is game-changing indeed.

As you'll see in the following analysis, Swift has the potential to both revolutionize professional app development while at the same time opening the door to more recreational and educational programming.

This dual nature, of both high-performance resultant code and highly interactive development, is something we haven't seen before. If Apple can pull it off effectively, it will be something special.

Why should we care about a new programming language?

Language designers (and students and academics) create new programming languages all the time. I designed a language back in the dark ages that won an academic engineering research award.

There's a big difference between a new programming language and a new programming language from Apple that's intended to be the default iOS language. Any ol' language might, over time, get picked up and used. But with 9 million registered developers and 130 million new customers added in just the last year , you can be sure that Swift is going to experience extreme adoption at a breakneck pace.

Why will iOS developers care about a new language?

Well, that's a very different thing. First, because Apple is putting its stamp of approval on Swift (and tentatively removing it from Objective-C), it means that over time, developers will have to learn this new language.

Think of how you'd feel if one day, the government announced that the new national language would be Klingon. Even if you thought that was the coolest idea ever, you'd still be a bit anxious about how difficult the language would be to learn, and who else you'd be able to talk to.

More to the point, the combination of language plus IDE (interactive development environment) plus API (application programming interface) pretty much determines everything about the level of effort, cost, maintainability, enjoyment, performance, and capabilities of the apps developers produce.

Choosing the right (or the wrong) language can have profound consequences on the lifecycle of a product.

What are the business implications of Swift?

We'll get into the programming effectiveness implications in a later question. For the moment, though, it's important to note that this will have a big impact on the programming training aftermarket, which spans everything from writers of books on the language to online training services (like Lynda.com) even to colleges like UC Berkeley (where I teach object-oriented programming).

First off, you can bet that the products, classes, and training programs for Objective-C will begin to lose steam. If Swift sees big adoption, it will be at the cost of Objective-C, so if you're currently providing an Objective-C training product, expect it to be reaching the maintenance and end-of-life phases over the next few years.

On the other hand, this opens up a wide range of new opportunities for producing materials around Swift, again in the form of books, training services, and academic programs. With 9 million developers, there's certainly a market, but the content of content being taught will need to change.

There are more business implications, but I'll talk about them later on in the article. 

So what makes Swift so special?

First, understand that most iOS (and most Mac) programming has been done in Objective-C, which is Apple's own variant of the C programming language. C was an elegant for its time, but it was designed in the early 1970s, when computer software was vastly less complex than it is today.

A decade later, both C++ and Objective-C were developed, solving some of the same sorts of code scaling and reuse problems, but with different approaches. As we all know, Apple, through its NeXT acquisition, acquired Objective-C, and it became the primary development language for Apple software.

Back in 2012, in my True confessions of a former iPhone developer , I described Objective-C as "It's a lot like someone welded two separate programming languages together and forgot to grind down the rough edges."

That's because the message passing extensions that Objective-C brought to C are coded in a different syntax than the rest of the C code around them. If you write Objective C code, you get lots of code that seems to be bouncing between two completely different languages. It's ugly and inelegant.

Now, I know a lot of you die-hard Apple programmers will sing the praises of Objective-C, and there's no doubt it gets the job done, but there are clearly crufty elements in the language.

The way Apple described Swift is "Objective-C without the C." Based on what we know of these two welded programming paradigms — C's function-based model plus Objective-C's message passing model — we can pretty well assume that Swift will be all about message passing.

If you're not a programmer, don't worry too much about what that means. Just understand that anytime you can streamline code in a way that makes it more holistic, it has a benefit to productivity and maintainability.

There's more to it, of course, and we'll get to that later on.

Next: the art and science of programming...

By the way, I'm doing more updates on Twitter and Facebook than ever before. Be sure to follow me on Twitter at @DavidGewirtz and on Facebook at Facebook.com/DavidGewirtz.

Topics: Mobility, Apple, Developer


In addition to hosting the ZDNet Government and ZDNet DIY-IT blogs, CBS Interactive's Distinguished Lecturer David Gewirtz is an author, U.S. policy advisor and computer scientist. He is featured in The History Channel special The President's Book of Secrets, is one of America's foremost cyber-security experts, and is a top expert on savi... Full Bio

zdnet_core.socialButton.googleLabel Contact Disclosure

Kick off your day with ZDNet's daily email newsletter. It's the freshest tech news and opinion, served hot. Get it.

Related Stories

The best of ZDNet, delivered

You have been successfully signed up. To sign up for more newsletters or to manage your account, visit the Newsletter Subscription Center.
Subscription failed.