In swift there are quite a few ways on defining a dictionary. So, are all of these identical?
var dic1 = Dictionary<String, Int>()
var dic2 = [String:Int]()
var dic3: Dictionary = Dictionary<String, Int>()
var dic4: Dictionary = [String:Int]()
var dic5: Dictionary<String, Int> = Dictionary<String, Int>()
var dic6: Dictionary<String, Int> = [String: Int]()
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…