Swift grammar Precautions (a)

1. Character string operator can also use the interval, but can not be used in the for-in;

2. the function parameter is let, can only be let

3. a function can only have a maximum of a variable parameter

4. The variable parameters in the parameter immediately behind the label can omit the parameter

The variable parameters can not be marked inout

6.inout parameters can not have default values, and inout parameters must be passed can be assigned multiple times

7. original enumeration value does not take up memory

The automatic closure @autoclosure only support () -> format parameter T

9.lazy property only var, can not be let, let it must have a value before the example method is completed

10. If multiple threads first visit lazy property, we can not guarantee that the properties are initialized only once

11. When a structure comprising a delay memory property, only the memory access latency can var property, because of the need to change the structure of the delay memory initialization properties

12. Continued (09- Method)

Guess you like

Origin www.cnblogs.com/baisemoli/p/11249582.html