[swift-evolution] Proposal: conversion protocol naming conventions

brad.hilton.nw at gmail.com brad.hilton.nw at gmail.com
Wed Mar 2 18:18:22 CST 2016


Just going to put in my two cents: I think `Initializable` makes more sense than `Createable` or `Instantiable` assuming that we want to encourage protocols with initializers rather than static methods which aren’t as pretty. ;) I believe `Serializable` or `Representable` would be great for converting types to a given value. I’m also of the mind that `Convertible` should represent the combination of `Initializable` and `Serializable` protocols and may in many cases simply exist as a convenience protocol that inherits from the two.

> 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 `CustomStringProjectable` 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
> 
> 
> 


More information about the swift-evolution mailing list