![]() |
|
Apple releases NEW language for IOS and MAC apps - Printable Version +- Sinisterly (https://sinister.ly) +-- Forum: Coding (https://sinister.ly/Forum-Coding) +--- Forum: Coding (https://sinister.ly/Forum-Coding--71) +--- Thread: Apple releases NEW language for IOS and MAC apps (/Thread-Apple-releases-NEW-language-for-IOS-and-MAC-apps) |
Apple releases NEW language for IOS and MAC apps - Eleven - 06-06-2014 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/prerelease/ios/documentation/Swift/Conceptual/Swift_Programming_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: RE: Apple releases NEW language for IOS and MAC apps - erpicci - 06-06-2014 Surely Apple is impressive when it comes to marketing. I read the post as well as some documentation on the official website; my feeling is that they "updated" Objective C with some (not so innovative) features:
Actually, what I would expect from a modern programming language is native and secure support to concurrency and distribution, like the channel-style communication pattern used by Ada, Google Go and others. RE: Apple releases NEW language for IOS and MAC apps - Inori - 06-06-2014 Are you sh!tting me? Gahh dammit I was just about to finish my tuner app, too! Whelp, shit. Guess I'm starting over. Anyway, thanks for the share. (also, I have a really old iBook G4 I haven't used in a while. Do you know if it's compatible? )
RE: Apple releases NEW language for IOS and MAC apps - chmod - 06-06-2014 (06-06-2014, 07:58 PM)Jinxed Wrote: Are you sh!tting me? I doubt it, unless you pay the low low price of $129.99 :Yuck: Back on topic I've never really seen the point of OS specific languages to me the idea is to make it as easy to port as possible as you never know. |