Swift Chinese Course (a) Welcome to Swift's World

Source: Internet
Author: User
Tags new features object model

Apple released the swift programming language in WWDC early in the morning, the grammar introduction I like very much, the market does not have the complete Chinese course, I downloaded the English original in the ibooks, now starts to attempt to translate swift. I will take time to adhere to the original translation, time is limited, not the place please advise.

New SWIFTER-QQ Group: 362232993, the lovers into.

Chapter One: Welcome to Swift's World

1, Introduction

Swift is a brand new programming language for iOS and OS apps, built on the basis of C and Objective-c languages, and perfectly compatible with the C language. Swift employs a secure programming model that adds new features to many modern languages, making programming work easier, more flexible, and more fun. Swift begins anew in the mature and popular Cocoa and Cocoa touch Framework, providing a new perspective for software development work.

Swift has existed for many years. Apple has built Swift's foundation for years of improvements to existing compilers, debuggers, and infrastructure. We simplify memory management through arc (Automatic Reference counting, automatic association counting), and our stack framework is based on a stable cocoa framework and makes it more modern and standardized. OBJECTIVE-C supports blocks, sets, and models in the evolution of development, which makes the architecture of programming language technology perfect. Thanks to these basics, let's now be able to recommend a new programming language--swift for future Apple software development.

Swift uses the OBJECTIVE-C parameter naming and dynamic object model. It is seamlessly docking with the existing Cocoa framework and mix-and-match with OBJECTIVE-C (embedded) interoperability. Based on this, Swift also introduces new features and combines language-oriented and object-oriented features.

Swift is also friendly to novices, an industrial-grade system programming language, and as a scripting language is generally lively and interesting. It supports playground, which has a new feature that allows programmers to preview the effects in real time without having to create and run the app frequently.

Swift incorporates the wisdom of modern language thinking in the broad Apple engineering culture. From "Hello,world" to the entire language system, the compiler optimizes performance, language improves development efficiency, and without any compromise, it makes swift a practical option for developers and Apple in the future.

Swift is a wonderful way to write iOS and OS X apps, and we have great expectations for swift, and we will continue to introduce new features and new features. We can't wait to see you do something with it.

2,hello World

In Swift, "Hello,world" requires only one line:

Pringin ("Hello World")

If you have written C or objective-c, then this syntax is more familiar to you, and in Swift, this is a complete program. You don't need to introduce any library or function like a input/output or string handle, and global variables are both portals to the program, so you don't have to have a main function or a semicolon at the end of each statement.

This primer will give you enough information to teach you to complete a programming task. You don't have to worry about something you don't understand, and all the things you don't explain will be explained in detail later in this book.

Note

As a best practice, you can open this chapter in the playground of Xcode. Playground allows you to edit the code and see the results immediately.

Author: cnblogs Joe.huang

See more highlights of this column: http://www.bianceng.cnhttp://www.bianceng.cn/Programming/extra/

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.