4 ms·
But the "noise" also reduces ambiguity. For example, you can search the code and see s is a NSString in Objective C. You can't do this in Swift.
by xyzzy4 11y ago
But the "noise" also reduces ambiguity. For example, you can search the code and see s is a NSString in Objective C. You can't do this in Swift.
- maxdesiatov 11y agoYou can just alt-click on the variable in Xcode and see the inferred variable type instantly, no matter what the type is or where the variable is declared. No need to search. You can't do this in Objective-C.
- melling 11y agoCan't say that I see the value in that but you do have the option of adding types the old fashion way. let s = "Swift is the future" let s:String = "Swift is the future" It's just a matter of making a coding convention.
- supster 11y agoWell you can see that s is a string because of the assignment, and if you want you can also add type annotations like let s: String = "Swift is the future"