This month we have been working on the most difficult aspect of the converter - type conversion and optionals.
Since the Swift language is considerably more strongly typed than Objective-C,
explicit type conversions are required in many cases, as with incompatible function parameters and return types:
- An implicit cast is used whenever a type of expression is different from a context type;
- An ?? operator is used to unwrap optional expressions whenever possible;
- Most type conversion and unwrapping cases are supported, depending on the expression and context types.
Please sign in to leave a comment.