Sent from my iPad
On Jul 20, 2016, at 8:47 PM, Brent Royal-Gordon via swift-evolution <[email protected]> wrote: >> 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? I think this is semantically identical to the idea of named accessors listed as a future direction. > > -- > Brent Royal-Gordon > Architechies > > _______________________________________________ > swift-evolution mailing list > [email protected] > https://lists.swift.org/mailman/listinfo/swift-evolution _______________________________________________ swift-evolution mailing list [email protected] https://lists.swift.org/mailman/listinfo/swift-evolution
