[swift-evolution] [Review] SE-0089: Renaming String.init<T>(_: T)

Brent Royal-Gordon brent at architechies.com
Tue May 17 23:49:05 CDT 2016


> 	* What is your evaluation of the proposal?

I think this is a good and long-needed change.

I also think that the matching protocols should be renamed to correspond to the initializers used to invoke them: CustomStringConvertible should become PrintingStringConvertible, and CustomDebugStringConvertible should become ReflectingStringConvertible. (The suffixes may change depending on SE-0041, of course.)

> 	* Is the problem being addressed significant enough to warrant a change to Swift?

Yes. I've always found it rather disturbing and bizarre that you could make a String out of anything and get a random, possibly unintended result. `String.init(printing:)` makes this more intentional, which is definitely a good thing.

> 	* Does this proposal fit well with the feel and direction of Swift?

Yes. We're all about being explicit, right?

> 	* If you have used other languages or libraries with a similar feature, how do you feel that this proposal compares to those?

I much prefer Swift's solution of using an initializer to other languages' use of `to_s` or `toString()` methods.

> 	* How much effort did you put into your review? A glance, a quick reading, or an in-depth study?

Quick reading.

-- 
Brent Royal-Gordon
Architechies



More information about the swift-evolution mailing list