DroidsOnRoids / swift-style-guide

Droids on Roids Swift guidelines
8 stars 2 forks source link

CustomStringConvertible #9

Closed ochococo closed 7 years ago

ochococo commented 8 years ago

Just a minor detail.

Nice to conform to CustomStringConvertible when implementing textual representation, ex.:

extension Circle: CustomStringConvertible {
    var description: String {
        return "Circle at \(centerString()) with an area of \(computeArea())"
    }
}
sochalewski commented 7 years ago

Closed. It's a good tip, but should not be considered as a rule.