Do I need to create a md file in the swift evolution repository to post my 
proposal?

> On Mar 19, 2016, at 00:12, Jordan Rose <[email protected]> wrote:
> 
> [+swift-evolution] Sure! It's just a fancy word for doing something like this:
> 
> protocol SelfAppendable {
>   init()
>   func +=(other: Self)
> }
> 
> func *<Sequence: SelfAppendable >(sequence: Sequence, count: Int) -> Sequence 
> {
>   var result = Sequence()
>   for _ in 0..<count {
>     result += sequence
>   }
>   return result
> }
> 
> extension Array: SelfAppendable {}
> extension String: SelfAppendable {}
> 
> Both Array and String already have no-argument initializers and a += 
> function, but they come from the standard library and don't (necessarily) 
> satisfy any protocols, so they wouldn't be declared "implement". I can think 
> of a few different ways to deal with this, but mostly I just want to make 
> sure you (and everyone else) are considering this use case in your proposal. 
> :-)
> 
> Best,
> Jordan
> 
>> On Mar 18, 2016, at 17:04 , Victor Gao <[email protected] 
>> <mailto:[email protected]>> wrote:
>> 
>> Hi Jordan,
>> 
>> Could you explain more of what retroactive modeling is and how it affects 
>> the proposal? I am unfamiliar with retroactive modeling. Thanks!
>> 
>> Victor Gao.
> 

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

Reply via email to