-1
I understand the idea. But we would still need a replacement for “typealias” 
because “Element: typealias” says “Element is a type alias” and not “Element is 
an associated type”. 
Also, it would be difficult to add inheritance clauses and default values. 
“Element is an associated type that conforms to SequenceType, and is an Array 
of Int by default”
is currently
typealias Element : SequenceType = Array<Int>
but I don’t see how it could be written with your proposed syntax.

- Loïc

> On Dec 19, 2015, at 11:52 PM, Tino Heth <[email protected]> wrote:
> 
> Another spontaneous idea (not sure weather I actually like it — take it as 
> brainstorming):
> Variable deklarations have the form
> thatIsTheName: ThatIsWhatIAm
> so the ambiguity could be resolved by
> ElementType: typealias
> which would say "ElementType is a associated type", like
> let i: Int
> says "i is an integer"

_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to