Friday, July 17, 2015

Swift - Interactive playgrounds

Swift. A modern programming language that is safe, fast, and interactive.


Interactive Playgrounds

Playgrounds make writing Swift code incredibly simple and fun. Type a line of code and the result appears immediately. You can then Quick Look the result from the side of your code, or pin that result directly below. The result view can display graphics, lists of results, or graphs of a value over time. You can open the Timeline Assistant to watch a complex view evolve and animate, great for experimenting with new UI code, or to play an animated SpriteKit scene as you code it. When you’ve perfected your code in the playground, simply move that code into your project.
And new in Xcode 7, playgrounds can contain comments that use rich text with bold, italic, and bullet lists in addition to embedded images and links. You can even embed resources and supporting Swift source code in the playground to make the experience incredibly powerful and engaging, while the visible code remains simple. Playgrounds let you:
  • Share curriculum to teach programming with beautiful text and interactive code.
  • Design a new algorithm and watch its results every step of the way.
  • Create new tests and verify they work before promoting into your test suite.
  • Experiment with new APIs to hone your Swift coding skills.
  • Turn your experiments into documentation with example code that runs within the playground.
Read-Eval-Print-Loop (REPL). The LLDB debugging console in Xcode includes an interactive version of the Swift language built right in. Use Swift syntax to evaluate and interact with your running app, or write new code to see how it works in a script-like environment. Available from within the Xcode console or in Terminal.

Learn More: https://developer.apple.com/swift/#playgrounds

No comments: