[swift-evolution] [Proposal] Adjusting `inout` Declarations for Type Decoration

Howard Lovatt howard.lovatt at gmail.com
Sat Jan 30 00:37:08 CST 2016

+1 for me including changing the call site to match, IE:

    func add(number n: inout Int)
    add(number: inout n)

On Saturday, 30 January 2016, Jordan Rose via swift-evolution <
swift-evolution at swift.org> wrote:

> [ Proposal link: https://github.com/apple/swift-evolution/pull/127 ]
> +1. As has been noted elsewhere, inout isn't *just* part of the parameter
> (since it appears in function types), and it's not part of the parameter's
> type (since within the body there's no inout-ness, and you can't put
> 'inout' in a typealias on its own). To me, that means neither side of the
> colon is inherently "correct", and therefore I prefer the slight
> consistency with function types and with call sites, and the removal of the
> possibility for typos becoming external parameter names.
> Jordan

  -- Howard.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160130/dff61dd1/attachment.html>

More information about the swift-evolution mailing list