Performance difference from zero. At compile time, Swift infers the type and writes it for you. But after compilation, both statements are identical.
This is solely a matter of readability and, sometimes, compiler efficiency.
Readability, as in the expression let image: UIImage = UIImage() double view of UIImage is simply messy. And in the case of more complex types, this is very important - no one wants to write let keys: LazyForwardCollection<MapCollectionView<Dictionary<String, Int>, String>> = dict.keys , when they can write let keys = dict.keys .
Compiler efficiency, because sometimes you find that a particularly ambiguous type (literal literals are known for this), where many overloads need to be resolved, can be compiled much faster if you explicitly name the type on the left side. But this is just a question of how quickly it compiles, not how quickly it starts after compiling it.
Airspeed velocity
source share