The naughty child Xiao Ming and his moonlighting aunt one story The naughty kid Xiao Ming is going to have his 7th birthday. He blocked the door of his house early in the morning and asked for red envelopes from relatives who came to celebrate his birthday. He also said that he would make trouble if they didn't give him red envelopes. Knowledge Points
two story After eating the cake and seeing everyone off, Xiao Ming happily opened the red envelope. Wow! There are so many Mao Zedongs in this red envelope! Wow! There are actually US dollars in this red envelope! Wow! This red envelope is actually empty!!! Xiao Ming cried, cried so sadly, and the whole person collapsed. Knowledge Points
three story In the blink of an eye, Xiao Ming is about to celebrate his 8th birthday. Recalling the empty red envelopes he received when he was 7 years old, Xiao Ming prepared a transparent plastic bag early. When receiving red envelopes, he asked everyone to put the contents of the red envelopes into the plastic bag in front of him before he could go into the house to eat. If nothing fits into the plastic bag, Xiao Ming will throw a tantrum and spit (what a naughty child-_-|||) Knowledge Points This story is about optional binding of Optional type data.
Four story Xiao Ming has grown up and knows that it is not good to ask relatives to open the red envelopes in front of him. He doesn't care about some unscrupulous relatives giving empty red envelopes. He has learned to play dumb (how did he suddenly change so much-_-|||). Although he still gets upset when he opens an empty red envelope. Knowledge Points Implicitly unwrapped optional types Sometimes in the program architecture, after the first assignment, it can be determined that an optional type will always have a value. In this case, it is very inefficient to check and parse the optional value every time, because it is certain that it will always have a value. end Well, Xiao Ming's story is over! Don't give your juniors empty red envelopes in the future! Otherwise, when he grows up, he won't be able to implicitly interpret you! Haha |
<<: 25 great tips for intermediate Git users
>>: Don’t use subclasses! Swift is protocol-oriented at its core
[[164113]] This basic framework mainly includes t...
Introduction to product experience design thinking...
Early this morning, Google officially launched th...
The four-layer account structure and the many-to-...
Logic is the law and the basis of all thinking. Di...
[[120835]] "The trend of the world is that a...
In the early history of cancer, people hardly eve...
Recently, I am in charge of the e-commerce live b...
The State Administration for Market Regulation: P...
Every time I visit a museum, I am attracted by th...
How can I make the information I publish appear o...
[[122861]] Apple today officially released OS X Y...
[[161291]] 1. When will I be able to finish learn...
[[151765]] Everyone wants it, and many are trying...
[[328552]] Which one is better, iOS or Android? T...