[swift-evolution] Proposal: conversion protocol naming conventions
Erica Sadun
erica at ericasadun.com
Tue Dec 15 11:39:53 CST 2015
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> 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
>
>
> _______________________________________________
> 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/675a399f/attachment.html>
More information about the swift-evolution
mailing list