iOS Life

  • Home
  • ABOUT
  • SERVICES
  • PORTFOLIO
  • BLOG
  • Contact

Say Hello to Swift

Swift Playground

One of the biggest announcements coming out of WWDC this year is the creation of a completely new programming language called Swift – the newest programming language used to build apps. Today, most all Apple software is built with Objective-C. Originally designed in the 1980s and soon adopted by Next Computer–the Steve Jobs-led company whose technologies eventually morphed into the modern Mac and the iPhone–the language has ridden these devices to enormous popularity.Apple is wasting no time getting developers educated on the new tools available to them by making The Swift Programming Language guide book immediately available on iTunes. Apple’s new guide offers 500 pages of info on Swift, providing readers with a tour of the new language, along with a detailed guide that dives into each new language feature.

It should feel familiar to those who are already used to Objective-C, Apple says, and is meant to “unify the procedural and object-oriented portions of the language.” It does diverge from Objective-C in more than just the syntax, though; it also features variable types like tuples and optional types. It also includes operators that aren’t found in Objective-C, which allow you to perform remainder operations on floating-point numbers, for example.

Here are some of the highlights of the language according to Apple:

  • Closures (similar to blocks in C and Objective-C) unified with function pointers
  • Tuples and multiple return values
  • Generics
  • Fast and concise iteration over a range or collection
  • Structs that support methods, extensions, protocols.
  • Functional programming patterns, e.g.: map and filter

Objective-C was always a hard language to pick up for new developers. We’ll have to see if Swift makes getting started with app development on Apple’s platforms easier, but from a first look at the documentation, it definitely feels more accessible than Objective-C.

Interactive Playground

On top of this, Apple has added the “interactive playground”, a way of viewing the results of a piece of code as you type it. It reminds me of the Javascript language, trying to make it a more visual endeavor. It’s absolutely amazing. This is the wild card. Depending how well it works, the playground could push mainstream programming in a new direction, providing a more intuitive means of building code. This isn’t necessarily an Apple invention, but it is something that has been bubbling up over the last few years.

But if you put the playground to one side, Swift isn’t really that different from many other languages. It’s mainly a way of bringing Apple’s platform up to par with languages like Ruby and Python–all without sacrificing the speed of Objective-C.

Get Started

Ready to begin? Start with downloading the new XCode 6 Beta from the Apple Developer Portal. Next start reading The Swift Tour and for the best experience open the Guided Tour right in playground, which allows you to edit the code listings and see the results immediately.

Jun 4, 2014 Brian Coleman
iOS7, We've Got A ProblemIntroducing Cheapo Casino
You Might Also Like
 
Tutorial: How to test your app for IPv6 compatibility
 
Tutorial: In-App Purchases in Swift
8 years ago News, Swiftbook, ios8, swift, tutorial616
Follow Me
    
Categories
  • About Me
  • Frameworks
  • My Apps
  • News
  • Strategy
  • Swift
  • Tools
  • Tutorials
  • tvOS
  • Uncategorized
  • Videos
  • Watch
Archives
  • May 2016
  • January 2016
  • October 2015
  • July 2015
  • May 2015
  • April 2015
  • March 2015
  • November 2014
  • October 2014
  • September 2014
  • July 2014
  • June 2014
  • September 2013
  • August 2013
  • July 2013
  • June 2013
  • May 2013
  • April 2013
  • March 2013
  • February 2013
brianjcoleman on Twitter
  • Classix is still holding in the top charts on Apple TV in Canada. #55 Free, #23 Top Grossing. #tvos #appletv #app https://t.co/xuEJiT4rro, Jul 14
  • New Blog Post: "Classix for iPhone, iPad & Apple TV” #iOSDev #ios #swift #swiftlang #SwiftDevs #AppleTV Read here: https://t.co/uF6w3gYOot, May 20
  • New Blog Post: "How to test your app for IPv6 compatibility” #iOSDev #ios #swift #swiftlang #SwiftDevs Read here: https://t.co/SveichSUep, May 6

Recent Posts
  • Classix for iPhone, iPad & Apple TV
  • Tutorial: How to test your app for IPv6 compatibility
  • Tutorial: Testing SSL using Charles Proxy on an iOS Device
  • Tutorial: 3D Touch – Quick Actions in Swift
  • tvOS Tutorial: Top Shelf in Swift
Featured Apps
Classix
Sportsnet
TAGS
tutorialswiftios8iosobjective-cvideostrategygamesframeworknewsappsmonitizeios7applefacebookwatchtoolstvosios9bookdesignsocialapiprovisiontutorialsbooksiapiTunes ConnectIPv6
Search
ABOUT
Brian is a Lead iOS/tvOS Developer from Toronto with over 18 years of multifaceted experience including development, design, business analysis and project management.
MOST VIEWED
Tutorial: How To Use Login in Facebook SDK 4.1.x for Swift
163,489 views
Tutorial: How to test your app for IPv6 compatibility
102,074 views
Tutorial: How to use Auto Layout in Xcode 6
89,234 views
FOLLOW ME
    
Email Subscription
Sign up for my newsletter to receive the latest news and tutorials posted.

Enter your email address:

2013-2017 © Brian Coleman