[swift-evolution] Proposal: conversion protocol naming conventions
Matthew Johnson
matthew at anandabits.com
Tue Dec 15 11:47:51 CST 2015
Thanks for your input Erica! I would be happy with any convention that establishes clarity and consistency.
I wrote the proposal the way I did as it is the minimum change from current state that would establish clarity and consistency. My rationale was the smaller the change, the greater the chance of acceptance.
It would be great to hear whether the community would prefer minimal change or wants to make a larger change if a better end result is possible that way.
Matthew
> On Dec 15, 2015, at 11:39 AM, Erica Sadun via swift-evolution <swift-evolution at swift.org> wrote:
>
> And adding:
>
> I *hate* Convertible in its current form. Per your current write-up, the protocols should cover initialized from, converted to, and a mix. Let me suggest:
>
> * can be initialized from: Instantiable, Initializable
> * can be converted to: Expressible, Presentable, Projectable
> * can be represented as and instantiated by: Convertible
>
> For example, IntegerLiteralInitializable, CustomStringRepresentationExpressible, and DoubleTypeConvertible.
>
> -- Erica
>
>
>> On Dec 15, 2015, at 9:28 AM, Matthew Johnson via swift-evolution <swift-evolution at swift.org <mailto:swift-evolution at swift.org>> wrote:
>>
>> Bumping this thread. There wasn’t much response to the initial post, which may have been because Saturday night is probably not the best time to post a proposal. :)
>>
>> You can find the draft here: https://github.com/anandabits/swift-evolution/blob/conversion-protocol-conventions/proposals/0000-conversion-protocol-conventions.md <https://github.com/anandabits/swift-evolution/blob/conversion-protocol-conventions/proposals/0000-conversion-protocol-conventions.md>
>>
>> The little feedback I did receive was positive.
>>
>> Matthew
>>
>>> On Dec 12, 2015, at 8:40 PM, Matthew Johnson via swift-evolution <swift-evolution at swift.org <mailto:swift-evolution at swift.org>> wrote:
>>>
>>> I have drafted a proposal to establish precise conventional meaning for the use of `Convertible`, `Representable`, and `Projectable` protocol suffixes. The proposal would require renaming `CustomStringConvertible` and `CustomDebugStringConvertible` to `CustomStringProjectable` and `CustomDebugStringProjectable` respectively
>>>
>>> I am seeking input on the proposal before submitting a PR. The full draft can found at https://github.com/anandabits/swift-evolution/blob/conversion-protocol-conventions/proposals/0000-conversion-protocol-conventions.md <https://github.com/anandabits/swift-evolution/blob/conversion-protocol-conventions/proposals/0000-conversion-protocol-conventions.md>.
>>>
>>> Thanks,
>>> Matthew
>>>
>>> _______________________________________________
>>> swift-evolution mailing list
>>> swift-evolution at swift.org <mailto:swift-evolution at swift.org>
>>> https://lists.swift.org/mailman/listinfo/swift-evolution <https://lists.swift.org/mailman/listinfo/swift-evolution>
>>
>>
>> _______________________________________________
>> swift-evolution mailing list
>> swift-evolution at swift.org <mailto:swift-evolution at swift.org>
>> https://lists.swift.org/mailman/listinfo/swift-evolution
>
>
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20151215/91b4068e/attachment.html>
More information about the swift-evolution
mailing list