In swift there are quite a few ways on defining a dictionary. So, are all of these identical?
var dic1 = Dictionary()
var dic2 = [String:
Yes, all these 6 lines do produce the same result:
key has type Stringvalue has type IntThere are still more for example:
var dic7 : [String:Int] = [:]
but yes, they are all identical.
Basically, unless the type is not included in the part right from the equation sign, type annotations in declaration lines are not needed because the compiler can infer the type.