> On Jul 20, 2016, at 12:58 PM, Garth Snyder via swift-evolution 
> <[email protected]> wrote:
> 
> However, the current notation of -> Type being used to declare an input 
> parameter to set {} just strikes me as weird and wrong. The symbol -> means 
> “returns a” or “yields”. Since we’re declaring a type that might be either 
> inbound or outbound, the neutral : is more appropriate.

If, as seems likely for lens support, we eventually supported inout functions:

        func foo(x: Int) -> inout String {
                get { return myStr }
                set { myStr = newValue }
        }

Would you feel differently about having `:` on subscript returns? Or would you 
want to use `:` on inout functions, too?

-- 
Brent Royal-Gordon
Architechies

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

Reply via email to