My apologies for being so quiet this past year, I have found it much harder to maintain a blog after college (or university for anybody not in the US). I have been hard at work coding my face off as often as possible to keep myself sharp by learning more and more languages. Just in the past 6 months, I have switched my focus to creating games - nothing special, just some 2D games created mainly for Android and iOS. Because of this, my skills in Java and Objective-C have skyrocketed exponentially in the past few months.
I have also begun to learn Apple’s new language, Swift very recently. I have to say, Swift is very intuitive and so easy to pick up. Apple released an iBook with as much information as you can handle that walks you through some tutorials on how to do things. Of course, you would most likely benefit from this book if you already know at least one language as it doesn’t teach you the concept of how to code.
Some of my favorite features of Swift:
- Ability to return multiple values from functions/methods
- Semicolons are optional as long as you only have one instruction per line
- More of a C-like context
- Functions inside of functions inside of functions
- Interfaces with Objective-C and other core iOS/OSX features beautifully
- Spitting out ideas are quick and easy, especially with the new “Playground” feature
- So much more
For those of you wondering, Playground allows you to get instant results when coding in Swift (you must be using the Playground feature, which is not available inside of already existing projects).
For example, I can get instant feedback when trying to see how to concatenate strings (shown below).
Disclaimer: I do not claim to know the anatomy of Kitties and Monkeys
You can also see values of variables as they go through a loop in a graph view such as the one below.
I haven’t gone too far into Swift yet, so please check it out for yourself if you are an Apple Developer. Otherwise, you will likely have to wait until September when they release it as part of Xcode. Of course, you also must use OSX to code with Swift.