[swift-evolution] [SE-0011] Re-considering the replacement keyword for "typealias"
dabrahams at apple.com
Mon Dec 21 20:34:58 CST 2015
> On Dec 21, 2015, at 4:57 PM, Jordan Rose via swift-evolution <swift-evolution at swift.org> wrote:
>> On Dec 20, 2015, at 3:58 , Tino Heth via swift-evolution <swift-evolution at swift.org <mailto:swift-evolution at swift.org>> wrote:
>>> The main reason to use `associated` is because the feature is called an "associated type". If we're willing to rename the feature to "placeholder type", then `placeholder` would be a good keyword.
>> good point - maybe it's because I'm no native speaker, but for me "associated type" is just a technical term with no obvious meaning.
> Fair enough; "associated type" is a fairly vacuous term. I think the implication is that when you choose a model of the protocol, the concrete type, then these other types come along with it. But that's not immediately clear, so I don't think renaming the feature is out of the question.
> I don't like the name "placeholder" or "placeholder type" because that only describes how they're used in the protocol. When you're actually implementing a generic function, the generic parameter is a sort of placeholder, and the associated types are just as concrete as the conforming type itself.
I’m actually coming around to wanting it to be just “type” as a contextual keyword, if we can make that work. The point is that these types aren’t “associated” in any way that distinguishes them from other requirements on nested declarations, i.e. funcs and vars.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-evolution