![]() But it could become a bit of a daunting task if it wasn’t for Type Inference adding a lot of type information for you, almost like writing in a scripting language. Strong typing is really, really beneficial for safety. It’s easy to get a birds-eye view of your whole project and to convert many files at once. You have to typecast it first (actually construct a Double from an Int): let i: Int = 42 The class we use to convert a string to a date in Swift is DateFormatter (or NSDateFormatter if you are using Objective-C). Using the Advanced Project Converter to work at the project level streamlines the process of converting Objective-C to Swift. Swift has strong typing, meaning that Swift will not convert between types for you, unless you ask it to. ![]() ![]() There are a lot of other reasons to use Swift. The main feature is safety, but that may be seen as just a bonus side effect. Swift comes with a lot of really nice features that make it hard to go back to Objective-C.
0 Comments
Leave a Reply. |