1,a Single statement can be broken to multiple lines, for example, after an opening parenthesis are a good place:
Print
"World")
2,swift is a compiled language, the syntax of message-sending are dot-notation. Every noun is an object, and every verb is a message.
3,an object type can be extended in Swift, meaning so can define your own messages on the that type. For example, you can ' t normally send the Say-hello message to a number. But you can change a number of type so it can:
Extension Int { func SayHello () {
Print ("Hello, I ' m \ (self)") }
} 1.sayHello ()//outputs: "Hello, I ' M 1"
4, what "Everything are an object" really means. ?
In Swift, then, 1 are an object. In some languages, such as objective-c, it clearly are not; It is a "primitive" or scalar built-in data type. So the distinction being drawn are between object types on the one hand and scalars on the other. In Swift, there is no scalars; All types is ultimately object types. That's what "everything was an object" really means.
5,
IOS programming Fundamentals with Swift learning Note 0