[swift-evolution] [Review] SE-0006 Apply API Guidelines to the Standard Library

davesweeris at mac.com davesweeris at mac.com
Wed Jan 27 01:41:44 CST 2016

Same here… I like -Type for protocols that can only be used a generic constraint, and -able/-ible for protocols that can be “concrete” types.

> On Jan 25, 2016, at 07:40, Radosław Pietruszewski via swift-evolution <swift-evolution at swift.org> wrote:
> == Removed Type from protocol names ==
> Perhaps I’ve missed some discussion about this and I don’t see the context, but I’m not sure this is a positive change.
> I fear this might be confusing in practice, at least in some contexts. For example, there's nothing signifying that "Boolean" or "Integer" are protocols and not actual types. Same with “Sequence”, “OptionSet”, etc. Perhaps it doesn't matter because everyone will naturally go for `Bool`, `Int`, and `Array` anyway. But I can imagine a lot of confusion if someone tried that anyway, or perhaps saw that in the autocompletion, or the standard library browser (with no intention of using the protocol).
> I’m all for removing unnecessary noise and verbosity, but I think I would err on explicitness side here. It seemed like the -able/-Type convention did a good job disambiguating types you can actually instantiate from protocols, with very little “verbosity cost”.

More information about the swift-evolution mailing list