> On 18 May 2016, Brent Royal-Gordon wrote:
>
> I don't think `Convertible` is clearer than `Initializable`, but I think it
> rolls off the tongue better, is easier to spell, is more compatible with
> non-initializer implementations, and in general wins on a lot of squishy,
> subjective, hard-to-define axes.
>
> Subjectively, I've noticed that a lot of people *don't* think of things like
> `Double(myFloat)` as being initializers; they think of them as conversions.
> To those people, `Convertible` is probably the right name.
Isn't it odd that we use four different terms for both kinds of String
conversions that we have?
A1: extension Foo : CustomStringConvertible // proposed:
CustomStringRepresentable
A2: foo.description
A3: String(foo) // or `String(printing: foo)` if SE-0089 gets accepted
A4: print(foo)
B1: extension Foo : CustomDebugStringConvertible // proposed:
CustomDebugStringRepresentable
B2: foo.debugDescription
B3: String(reflecting: foo)
B4: debugPrint(foo)
I don't have great suggestions but wouldn't it be better to move the naming of
cases 1 & 2 towards the words used in cases 3 & 4?
— Pyry
_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution