Apple releases NEW language for IOS and MAC apps 06-06-2014, 12:13 AM
#1
Hello fellow programmers and hackers.
Recently in WWDC, one of the biggest conferences.Apple released a new programming language specifically built for IOS and OSX applications.
Called Swift, its a programming language billed as "Objective-C without the C."
Swift promises to have all the good with none of the bad. Apple promises that, at least in a few key benchmarks, it is considerably faster to execute than Python and faster even than Objective-C. But, despite that, the language supports what's called "playgrounds" within the Xcode developer environment, visualizing Swift code in real-time, like a scripting language.
Theres already a copy of "Flappy Bird" using the new Swift programming language.
Unfortunately just like when developing a iPhone app or OSX apps this is only available for mac users.
Getting started
To get started with this language and mastering it you will need to get Xcode 6 beta version here ; https://developer.apple.com/xcode/downloads/
Swift can be used with cocoa for developing applications.
Basic programming with Swift
Printing something out
Just like other programming languages not different at all heres how you print Hello World
println("Hello, world")
Simple values
Use let to make a constant and var to make a variable. The value of a constant doesn’t need to be known at compile time, but you must assign it a value exactly once. This means you can use constants to name a value that you determine once but use in many places.
var myVariable = 42
myVariable = 50
let myConstant = 42
More about programming with Swift here : https://developer.apple.com/swift/ Or https://developer.apple.com/library/prer..._Language/ For the detailed page about programming with Swift.
In the future
Whats Apple up to?
For starters, it's doing the obvious. Swift makes a lot of common errors harder and a number of bad practices impossible. If you choose, you can write code in Swift pretty tersely, which should make things easier for developers. It adds some nice new features that should make said developers more productive. All of those are good things.
Also, we can see Chicxulub coming. Two or three years from now, when Apple announces that the future is Swift and it's ready to drop Objective-C, we won't be at all surprised. And I won't be at all upset, because I'll have spent the intervening few years making sure I know how to use the new language.
The good
Swift is a fairly simple language so it will be easy for kids to learn programming.
Will Swift apps be faster than Objective-C apps?
On stage at WWDC, Apple’s Craig Federighi showed some interesting graphs that appeared to show a huge 40-50% performance lead for Swift over Objective-C. He did not say that apps written in Swift would be faster than Objective-C, though. And he was very picky about which benchmarks he showed. In reality, Swift is very unlikely to be significantly faster than Objective-C. They are both statically typed, compiled languages — using the same LLVM compiler, no less. To obtain such a graph, Apple probably had to choose an Objective-C feature that is known to be slow/buggy — or intentionally optimize a Swift feature, purely for the sake of producing a pretty graph.
We look forward to doing some real benchmarking in the coming weeks and months, though, as Swift apps start pop up on the App Store.
Share this new story to everyone! :Thumbs-Up:
Recently in WWDC, one of the biggest conferences.Apple released a new programming language specifically built for IOS and OSX applications.
Called Swift, its a programming language billed as "Objective-C without the C."
Swift promises to have all the good with none of the bad. Apple promises that, at least in a few key benchmarks, it is considerably faster to execute than Python and faster even than Objective-C. But, despite that, the language supports what's called "playgrounds" within the Xcode developer environment, visualizing Swift code in real-time, like a scripting language.
Theres already a copy of "Flappy Bird" using the new Swift programming language.
Unfortunately just like when developing a iPhone app or OSX apps this is only available for mac users.
Getting started
To get started with this language and mastering it you will need to get Xcode 6 beta version here ; https://developer.apple.com/xcode/downloads/
Swift can be used with cocoa for developing applications.
Basic programming with Swift
Printing something out
Just like other programming languages not different at all heres how you print Hello World
println("Hello, world")
Simple values
Use let to make a constant and var to make a variable. The value of a constant doesn’t need to be known at compile time, but you must assign it a value exactly once. This means you can use constants to name a value that you determine once but use in many places.
var myVariable = 42
myVariable = 50
let myConstant = 42
More about programming with Swift here : https://developer.apple.com/swift/ Or https://developer.apple.com/library/prer..._Language/ For the detailed page about programming with Swift.
In the future
Whats Apple up to?
For starters, it's doing the obvious. Swift makes a lot of common errors harder and a number of bad practices impossible. If you choose, you can write code in Swift pretty tersely, which should make things easier for developers. It adds some nice new features that should make said developers more productive. All of those are good things.
Also, we can see Chicxulub coming. Two or three years from now, when Apple announces that the future is Swift and it's ready to drop Objective-C, we won't be at all surprised. And I won't be at all upset, because I'll have spent the intervening few years making sure I know how to use the new language.
The good
Swift is a fairly simple language so it will be easy for kids to learn programming.
Will Swift apps be faster than Objective-C apps?
On stage at WWDC, Apple’s Craig Federighi showed some interesting graphs that appeared to show a huge 40-50% performance lead for Swift over Objective-C. He did not say that apps written in Swift would be faster than Objective-C, though. And he was very picky about which benchmarks he showed. In reality, Swift is very unlikely to be significantly faster than Objective-C. They are both statically typed, compiled languages — using the same LLVM compiler, no less. To obtain such a graph, Apple probably had to choose an Objective-C feature that is known to be slow/buggy — or intentionally optimize a Swift feature, purely for the sake of producing a pretty graph.
We look forward to doing some real benchmarking in the coming weeks and months, though, as Swift apps start pop up on the App Store.
Share this new story to everyone! :Thumbs-Up:
![[+]](https://sinister.ly/images/modern/collapse_collapsed.png)















)