Key words and explanations in Swift 2

Source: Internet
Author: User

1.swift Latest keywords and symbols reference:Https://developer.apple.com/library/mac/documentation/Swift/Conceptual/Swift_ programming_language/lexicalstructure.html#//apple_ref/doc/uid/tp40014097-ch30-id410

2. Some keyword explanation reference:http://www.cnblogs.com/iCocos/p/4631634.html

3. Other keywords such as:

Indirect for Recursive enumeration:http://wiki.jikexueyuan.com/project/swift/chapter2/08_Enumerations.html

Operator,precedence,associativity,left,right,none for defining the operation level:https://developer.apple.com/library/ prerelease/ios/documentation/swift/conceptual/swift_programming_language/advancedoperators.html#//apple_ref/ Doc/uid/tp40014097-ch27-xid_65

DynamicType for the reflection mechanism:http://ericasadun.com/2014/06/16/ swift-more-than-you-probably-want-to-know-about-type-introspection/

repeat keyword for similar java do While loop:http://www.runoob.com/swift/swift-repeat-while-loop.html

4. Related Other references:

Https://developer.apple.com/library/ios/documentation/Swift/Conceptual/BuildingCocoaApps/AdoptingCocoaDesignPatterns.html

Finally, we have to mention some Swift features:

1. Support Interval operators

2. Support Closures

3. Support Subscript operation

4. Support Sequence

5. Support WHERE clause

6. Unicode variable names and characters are supported. Numbers can be underlined to differentiate lengths

8. Optional binding, dynamic binding, optional chain

9.try do catch throws throw composition for easier exception handling

10.guard simplified code, and refer combination more powerful

11.Set Collection

12. The OC version of the Cocoa framework can be seamlessly converted to swift objects, such as Nssstring,nsmutablearray.

13. Protocols and structures, tuples

Key words and explanations in Swift 2

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.