[swift-evolution] [SE-0011] Re-considering the replacement keyword for "typealias"

Brent Royal-Gordon brent at architechies.com
Wed Dec 23 16:56:36 CST 2015


> All of the options I've seen suffer from a common problem:  The order of parameters isn't obvious.  If we use an additional keyword we can have a more readable syntax.
> 
> Example using "associate" and "with":
> 
> associate *NewType* with *ExistingType*

I don't understand what you're suggesting here. What is `ExistingType`? Does this go inside the `protocol` block or outside?

For illustration, perhaps you can translate this into your syntax:

	public protocol GeneratorType {
	    typealias Element
	    public mutating func next() -> Self.Element?
	}

-- 
Brent Royal-Gordon
Architechies



More information about the swift-evolution mailing list