From time to time, I got into a situation that I need to override initializers, inherited from a superclass, for my own class. For instance:
This article was written based on my personal perspective. Occasionally I found the usage of lazy variables from pull requests, and most of the times the thread safety issue of them was not properly handled. I…
偶爾,我會遇見宣告成 [String: Any]的參數。
[String: Any]
From time to time I encounter parameters declared as [String: Any].
雖然這樣的宣告提供了字典類別攜帶各種類別的值的彈性,但取值時卻常帶來麻煩。也許你曾讀到過類似的原始碼: