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
Bilibili , which just released its financial repo...
We can think of the user operation system as a bi...
At the beginning of this year, the appearance of ...
How can I add longer text after tapping on WeChat...
Introduction: As long as the trend is right, ever...
How to acquire thousands of target users within a...
Before I start sharing how to build a traffic cir...
The important substances that make up life have t...
When you enter the live broadcast room of Li Jiaq...
Recently, the article "Liquid Metal for the ...
Previously, we have introduced the promotion of m...
Author|Text: Xiaoka, Storyboard: Whole Wheat Brea...
Tuchong Creative During the summer vacation, refr...
Expert of this article: Pa Lize, Chief Physician ...
This article comes from the sharing of the founde...