automatic programming identifies a type of computer programming in which some mechanism generates a computer program to allow human programmers to write the code at a higher abstraction level — Wikipedia Code Generators in Swift, #Cocoaheads, Minsk 3
Runtime • Static Typing • No simple way to get types in runtime* • Hard to get metainformation at runtime* Code Generators in Swift, #Cocoaheads, Minsk 29
"sun" case Mon = "mon" case Tue = "tue" case Wed = "wed" case Thu = "thu" case Fri = "fri" case Sat = "sat" } Code Generators in Swift, #Cocoaheads, Minsk 64
public let image: String public let name: String public let description: String public let currency: String? public let serviceCharge: AdditionalCharges? public let paymentMethods: [PaymentMethod]? } Code Generators in Swift, #Cocoaheads, Minsk 65
up let validShop = Shop.restrictedRandom( shopId: "SE2016", currency: "UAH" ) // Everything will be copied but 'shopID' property let anotherShop = validShop.updated(shopId:"123") // If we want to set up nil value let notSavedYet = validShop.updated(internalId: Optional(nil)) let notSavedYet2 = validShop.updated(internalId: .Some(nil)) Code Generators in Swift, #Cocoaheads, Minsk 71