A long time ago in a galaxy far, far away, Apple announced the release of it’s own programming language known as Swift which uses the extension .swift. The language is available for Mac OS and Linux but Apple’s Xcode IDE is only available on Mac, sorry Windows users try running VMware or Virtualbox.
Swift’s goal is to make it a little bit easier for developers to create apps for Apple products such as IOS, Mac OS, TV OS and even their WatchOS. Plus, it even works side by side with Objective-C! With syntax improvements, interactive playgrounds and something called “error handling mode”, it grabs many programmers’ attention.
After giving Swift my best shot, I made a “hello world” program which was quite easy and the variables were easy to identify. But the thing is that I am used to PHP and nothing else so it takes me forever to figure out how to troubleshoot any other programming language.
My hello world:
I am so used to the semicolon that I always include it in any programming language I use which is kind of funny. Swift is quite fast and indeed powerful but for me it is so limited because I have no idea how to use it. I tried recursion in Swift but somehow I kept getting stack overflow because the computer kept on calculating and calculating and so on.
Since I am bad at the Linux command line and probably programming in general, I decided to use an online Swift compiler known as SwiftStub which gives you an online Swift compiler to test out your stuff. Sadly there is no GUI or anything and only a command line but I don’t care, I’m just happy that I got a “hello world” in 10 seconds into Swift.
Would I recommend it? Yep, it is fun but I still cannot figure out how to get the recursion thing right when I try to print the Fibonacci sequence because I always get stack overflow.
Well, I wish you luck on your adventures into Swift and Xcode.
Swift official website: https://swift.org/
Apple developer swift: https://developer.apple.com/swift/