I am not an Apple fun, I have never had a device or laptop from this brand … mainly because I prefer Android, but todday I must write about what happened on monday 2nd June (apart of the abdication of King Juan carlos I of Spain), and it’s about Swift.
Swift, a new language for iOS y OS X
Every time Apple has a technological event, the expectation is worldwide, but this kind of events are not on my expectation, since this morning, when Apple presents a new language called Swift, and alternative to Objective-C, and it will become in its replacement, because Objective-C is not very appeal for novices.
After reading a bit, Swift had borrowed a few features from Python, spacialy lists and conversion of types on variables. You need to use { } when using blocks of code, and the switch control structure must be use with careful.
- The structure of loops like for are veri similar toJavascript although with no parentesis.
- When defining functions can include parameters, one or more than one, and you can declare a type of output for the function. You need to use { }, like Javascript. As Python, functions can be defined with an undefined number of parameters, and also, functions can include functions (like Javascript).
- The creation of classes has no difference as you do with Javascript.
Here you have an entrance where you can read with more details about the features of Swift: http://www.cristalab.com/tutoriales/introduccion-a-swift-lenguaje-de-programacion-de-ios-y-os-x-c113538l/.
You can find a great course at mejorando.la, so you can sign in!
But, if you want the official documentation, it’s here: https://developer.apple.com/library/prerelease/ios/documentation/Swift/Conceptual/Swift_Programming_Language/TheBasics.html#//apple_ref/doc/uid/TP40014097-CH5.
Last, you have available the IDE XCode: https://developer.apple.com/xcode/.
By now, I won’t try, but I am waiting for you to tell me what you think of this new language!