> On May 28, 2016, at 10:46 PM, Patrick Smith <[email protected]> wrote: > > Thanks for replying Chris! > >> On 29 May 2016, at 6:00 AM, Chris Lattner <[email protected]> wrote: >> >> 2) If a value wants a better, or more customized, string form, then it >> conforms to CustomStringConvertible. > > > What are the use cases for this more customized string form?
print() and string interpolation use it. You conform to it and implement it when you want something specific to your type, otherwise you get the default reflection based implementation. The reflection implementation is better than nothing, but usually not what you want. -Chris _______________________________________________ swift-evolution mailing list [email protected] https://lists.swift.org/mailman/listinfo/swift-evolution
