> On Feb 18, 2017, at 4:18 PM, Michel Fortin via swift-evolution 
> <[email protected]> wrote:
> Le 17 févr. 2017 à 3:25, John McCall via swift-evolution 
> <[email protected]> a écrit :
> 
>> func endScope<T>(_ value: T) -> () {}
> 
> Just to be sure, that is the same thing as `move` where you to discard the 
> return value, right?
> 
>       let something = make()
>       endScope(something)
> 
> vs.
> 
>       let something = make()
>       _ = move(something)

Yes, when the thing being ended is just a 'let' or 'var'.  When it's an 'inout' 
or 'shared', it also immediately ends the access, which isn't at all equivalent 
to moving a value out.

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

Reply via email to