2024: Domino Containers - The Next Step. News from the Domino Container commu...
Generics
1. Generics
Generic code enables you to write flexible, reusable functions and types that can work with any type,
subject to requirements that you define. You can write code that avoids duplication and expresses its
intent in a clear, abstracted manner.
let us: go! iOS Developers Korea
https://docs.swift.org/swift-book/LanguageGuide/Generics.html
2. Type Safe
Type Safe: 컴파일 시 Type Check [fail fast]
let us: go! iOS Developers Korea
9. NSString * value = info[@“key”] /*objc */
let value: String = info[“key”]
let value: String = info[“key”] as! String
let value: String = info[“key”] as? String ?? “”
Cannot convert value of type 'Any?' to specified type 'String'
let us: go! iOS Developers Korea
10. let value: String = try info.value(“key”)
value = try info.value(“key”)
let us: go! iOS Developers Korea