Welcome to Swift (initial translation and annotations of Apple's official Swift document)

Source: Internet
Author: User

Welcome to Swift

Curated to: iOS enthusiast, title
I try to use my spare time to translate Apple official documents, limited to the level, inevitably wrong, welcome to correct me.

June 3, 2014
Recommendation Number: 123-4567

About Swift (Swift)

Swift is a new development language for iOS and OS X applications, built on OC (OBJECT-C) and C, but without the limitations of the C language compiler.

Swift employs a more secure programming model, adding new features to make programs easier, more resilient, and more interesting. Its clean page palette, the mature cocoa and cocoa Touch frameworks, are an opportunity to re-outline software development and design efforts.

Swift has been brewing for many years. Apple offers more advanced editors, debuggers, and framework structures to lay the groundwork for swift. We can simply manage the memory by using arc (Automatic Reference counting). The framework is completely built on the cocoa Foundation. The objective-c itself already supports block codes (blocks), modularity, exact matching, and advanced framework frameworks, thanks to these, which enable us to introduce this new language for Apple software development.

Swift is very familiar to objective-c developers. It uses OC-style parameter naming, improves readability, and OC Dynamic object mode, which provides an undifferentiated access to the cocoa framework and mixed-match OC code. These foundations, Swift also offers unique features and prototypes.

Swift is very friendly to the new scholar. It is the first industrial-grade system development language, vivid and enjoyable. It supports playgrounds, an innovative feature: programmers can experience the results of seeing code immediately after writing the SWIFT code, without having to compile and run the app.

Swift is a modern language that incorporates many Apple engineering cultures. For performance, compilation can be a choice, for development, language is also selected. " Hello,world "can design the scope of the full system. All of this, for developers, is worth studying for the next few years for Apple.

Swift is a novel way to write iOS and OS X and will continue to offer new features and compatibility in the future. We are ambitious and eager to use it.

A Swift Tour (Swift overview)

For a new language, the conservative advice is to print "Hello, world" on a computer screen. In Swift, this only requires a single line of code:

println ("Hello, World")

If you have written C or OC code before, then this syntax in Swift is very familiar to you. You do not need to impot a separate library of functions. The code write is used as the startup entry for the program, so you don't need the main function, and, You do not have to add semicolons at the end of each line.

The Overview section will provide you with enough information to write code and complete a number of program tasks using Swift. Don't worry, even if you're confused. Each of the details presented in the overview will be explained in more detail in the following sections of this book.

The prompt

For a better experience, in Xcode, open the contents of this chapter in playground mode.

Note: The official mention of Xcode refers to the latest version of Xcode6.0, which is below this version of the playground mode, and Xcode installs the Mac OS x system version requires a minimum of 10.9.3;

Translate today to the official Apple Document page fifth (depending on the screen size, will be different from the number of pages, please forgive me, the following translation, continue to follow ....) Please look forward to .....)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.