Getting started in Swift

Welcome!  

This post will serve as an intro and reference guide to all Swift posts and tutorials which I’ve been working on to post on my blog. Feel free to comment your thoughts and feedback in this section and all posts from me you come across. 

I will keep this section updated on a logical path for you to get the most of this great language!  

Ready to Swiftify?


Now, let’s get down to business.

Back in June 2014, a big announcement (the biggest, possible) was made at the World Wide Developers Conference (WWDC): a brand new programming language called Swift.   

When Swift was introduced, they called it “Objective-C without the C”. Objective-C is a programming language developed by Apple which is the basis of Swift, but still had a huge load of complex operators and your code would turn more buggable. Swift came out as a leaner and faster language.

Chris Lattner was the first mind behind Swift – admittedly, he worked alone on the project for about a year and then other Apple developers and engineers started to contribute.

22394-27012-lattner-top-l.jpg
Hey Chris, up to a coffee?

How does Swift stand in the crowd?

First of all, in programming, there’s no best language to work on. You can build amazing things in, perhaps, all languages available to learn.

What you’re willing to build will guide you on picking a better language. Here are some features Swift offers us:

  • Protocol-oriented Programming: remember Object-oriented Programming? This might be even a better approach to code orientation (TUTORIAL COMING SOON!!)
  • Tuples: you can code a function with multiple return types using tuples.

var user = (firstName: "Bruno", lastName: "Campos")
var firstName = user.firstName // Bruno
var lastName = user.lastName // Campos

  • Optionals: in many cases, you don’t need to assign a value to a variable right away

optional

  • Type-inference: Swift can figure out the type of constant or variable you’re declaring by taking a look at its value

typeinf

Swift and Xcode offer amazing tools for iOS development. The language can also be used on server-side applications and you can already run it on Linux or IBM Cloud.

Swift Playgrounds

No one better than Chris Lattner to explain how Playgrounds work. Take a look!

On Xcode, a Playground is an amazing feature that will help you get the most from Swift and play a lot with the language. Your code will be compiled right away and the results will appear on the sidebar.

There’s also an app for iPad which you can use this amazing feature. You can learn to code in an interactive way!

What’s the big deal of Swift?

If you want to develop iOS or OSX apps, Swift is the right choice. You’ll develop in a native environment which will provide advanced tools that will save you a lot of time when coding.

  • Easy to catch: if you already know to do some coding and got a notion of Object-oriented Programming, you’ll easily catch Swift. If you know no programming at all, Swift is probably the most intuitive language to start coding.
  • Multipurpose: we’re talking about a big market. iPhone, iPad, iPod, Mac, Apple Watch, TV, iMessage… You also can code server-side operations in Swift in a very lean way. Though, if you just want to play with data and automate some boring tasks, Swift is also the perfect catch – you might even use a Playground for that.
  • It rides fast…: one of my favorite attributes of Swift. It’s really catching up with C++ in terms of speed.
  • New features every year: Apple provides a great benchmark for the language. The community has been receiving a big update every year, so it means we have new libraries to work with. Also, iOS and Mac OS updates tend to open brand new opportunities and market gaps to be filled. Check out the official resources from Apple!

 So, excited for Swift?

Jump in my exclusive email newsletter and I will send you one email per week (that’s right, no spam) with tips, tutorials and a sneak-peek on paid projects I develop.

Just click here and subscribe

Advertisements

One thought on “Getting started in Swift

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s