在观看Apple关于LLDB调试器的视频时,我发现了一些我无法找到解释的内容; 当他写道时,他正在谈论可选值:
var optional: String? = nil; //This is ok, a common optional
var twice_optional: String?? = nil; //What is this and why's this useful??
Run Code Online (Sandbox Code Playgroud)
我打开了一个游乐场并开始尝试它,并意识到你可以根据需要编写任意?数量的游戏,然后用相同的数量打开它们!.我理解包装/解包变量的概念,但不能想到我想要包装值4,5或6次的情况.