[swift-evolution] [Pitch] Replace 'inout' with '&'
jgroff at apple.com
Mon Dec 21 12:25:50 CST 2015
> On Dec 19, 2015, at 4:10 PM, Erica Sadun <erica at ericasadun.com> wrote:
> What would the ramifications of the following be? Each addresses the "confusable with labeling" issue but preserve the inout keyword.
> func foo(x: inout Int)
> func foo(x: @inout(Int))
> func foo(x: @inout Int)
> Is there an underlying reason that parameter modification should live on the name side rather than the type side of the colon? They aren't really modifying the name
> -- Erica, inexperienced with Rust
Putting `inout` after the colon feels good to me. Like Jordan said, it meshes better with the type syntax, (inout Int) -> (), too.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-evolution