Swift each keyword represents the meaning

1. The front rewriting defined plus '' override '' Keyword

Subclasses can be inherited instance methods, class methods, instance properties, property class, or subscript provide your own custom implementation. We call this behavior is called rewrite.

2.final prevent them from being overridden

3.inout input and output parameters

4. mutating keyword modification methods are able to modify or enum struct variables in the process

The '!' Forces must unpack not able to obtain a value of nil

6. '?' Optional unpack later specifically

7. If an alternative type to be calculated when the system being given, the programmer need to manually handle optional type

8. '!' Forces unpack risk, need to be used with caution, programmers need to '!' In charge of the program will crash if it is nil

9. Be sure to consider the security must have a value of preventive measures

10. '??' merge empty option must increase the priority of ??

Reproduced in: https: //www.jianshu.com/p/3136ef0bc5ed

Guess you like

Origin blog.csdn.net/weixin_33850890/article/details/91164539