diff options
author | chenbridge <chenbridge@Bridge-Mac.local> | 2016-02-23 15:06:40 +0800 |
---|---|---|
committer | chenbridge <chenbridge@Bridge-Mac.local> | 2016-02-23 15:06:40 +0800 |
commit | 29555c9b70dbf5d6b2967215651d90c179c2466f (patch) | |
tree | c0554f3a4c6eb8790322bab03fbfd697dd15ae20 | |
parent | 3453e953557a68eb752e8098ff90c255188b5668 (diff) | |
parent | 54e95ab837454e35b80b2a1bd7a37d4ba4626946 (diff) |
Merge remote-tracking branch 'adambard/master'
-rw-r--r-- | ru-ru/d-ru.html.markdown | 2 | ||||
-rw-r--r-- | self.html.markdown | 2 | ||||
-rw-r--r-- | swift.html.markdown | 2 |
3 files changed, 4 insertions, 2 deletions
diff --git a/ru-ru/d-ru.html.markdown b/ru-ru/d-ru.html.markdown index 162ec4c8..bfa3f085 100644 --- a/ru-ru/d-ru.html.markdown +++ b/ru-ru/d-ru.html.markdown @@ -1,5 +1,5 @@ --- -language: d +language: D filename: learnd-ru.d contributors: - ["Anton Pastukhov", "http://dprogramming.ru/"] diff --git a/self.html.markdown b/self.html.markdown index 9290a0c9..fc7f69db 100644 --- a/self.html.markdown +++ b/self.html.markdown @@ -60,7 +60,7 @@ also sending the message 'true' to the lobby." # Sending messages to objects -Messages can either be unary, binary or keyword. Precedence is in that order. Unlike Smalltalk, the precedence of binary messages must be specified, and all keywords after the first must start with a capital letter. Messages are separeated from their destination by whitespace. +Messages can either be unary, binary or keyword. Precedence is in that order. Unlike Smalltalk, the precedence of binary messages must be specified, and all keywords after the first must start with a capital letter. Messages are separated from their destination by whitespace. ``` "unary message, sends 'printLine' to the object '23' diff --git a/swift.html.markdown b/swift.html.markdown index 46768375..e921e7ea 100644 --- a/swift.html.markdown +++ b/swift.html.markdown @@ -94,6 +94,8 @@ var unwrappedString: String! = "Value is expected." // same as above, but ! is a postfix operator (more syntax candy) var unwrappedString2: ImplicitlyUnwrappedOptional<String> = "Value is expected." +// If let structure - +// If let is a special structure in Swift that allows you to check if an Optional rhs holds a value, and in case it does - unwraps and assigns it to the lhs. if let someOptionalStringConstant = someOptionalString { // has `Some` value, non-nil if !someOptionalStringConstant.hasPrefix("ok") { |