[swift-evolution] [Review] SE-0041: Updating Protocol Naming Conventions for Conversions
jed.lewison at icloud.com
Tue May 10 22:46:54 CDT 2016
I agree that CustomStringConvertible and CustomDebugStringConvertible are confusing, but in general, ‘Convertible’ and ‘Representable’ as currently used actually make sense to me.
Convert means to transform, so it feels natural to me to think of something that is a FooLiteralConvertible as being something that be converted from a FooLiteral.
To represent means to stand in for, so it feels natural to say that if a can represent b and b can represent a, then it’s representable.
The rub comes with CustomStringConvertible and CustomDebugStringConvertible, which while it makes sense linguistically, creates confusion in Swift because it converts in the opposite direction of all the other convertible protocols.
I’m not sure what the rationale was for moving away from Printable and DebugPrintable; maybe it was that everything should be printable? If so, then perhaps CustomPrintable and CustomDebugPrintable would do the job?
> On May 10, 2016, at 11:48 AM, Chris Lattner via swift-evolution <swift-evolution at swift.org> wrote:
> Hello Swift community,
> The review of "SE-0041: Updating Protocol Naming Conventions for Conversions" begins now and runs through May 16. The proposal is available here:
> Reviews are an important part of the Swift evolution process. All reviews should be sent to the swift-evolution mailing list at
> or, if you would like to keep your feedback private, directly to the review manager.
> What goes into a review?
> The goal of the review process is to improve the proposal under review through constructive criticism and contribute to the direction of Swift. When writing your review, here are some questions you might want to answer in your review:
> * What is your evaluation of the proposal?
> * Is the problem being addressed significant enough to warrant a change to Swift?
> * Does this proposal fit well with the feel and direction of Swift?
> * If you have used other languages or libraries with a similar feature, how do you feel that this proposal compares to those?
> * How much effort did you put into your review? A glance, a quick reading, or an in-depth study?
> More information about the Swift evolution process is available at
> Thank you,
> -Chris Lattner
> Review Manager
> swift-evolution mailing list
> swift-evolution at swift.org
More information about the swift-evolution