[swift-evolution] [Review] SE-0018 Flexible Memberwise Initialization

Kevin Ballard kevin at sb.org
Thu Jan 7 15:34:52 CST 2016

On Thu, Jan 7, 2016, at 11:23 AM, Alex Johnson via swift-evolution wrote:
> Meanwhile, back on the topic of the "..." placeholder.
> For me, it boils down to:
>  1. The addition of the "memberwise" keyword and associated behavior
>     would stand on it's own, without the inclusion of the "..."
>     placeholder syntax. (IMO)
>  2. Omitting the "..." placeholder syntax *now* wouldn't prevent it
>     from being added *later*. If you agree with those statements, then
>     the principle of "smallest, incremental change[1]" [swift.org]
>     seems to imply that the placeholder should be removed from this
>     proposal.
> That's my opinion. Does the rest of the community feel that the "..."
> placeholder is a *necessary* part of this proposal?

Yes, I feel that the "..." placeholder is necessary. I cannot support a
proposal that results in

memberwise init() {}

because that initializer very clearly takes no arguments! The "..."
serves as a visual indicator for where the arguments go and I think
that's important.

Also, and though this isn't explicitly spelled out in the proposal it
seems like a reasonable assumption to make, the existence of "..." lets
me put it somewhere other than at the end of the arguments list, e.g.

memberwise init(..., foo: String) {}

-Kevin Ballard


  1. https://swift.org/contributing/#incremental-development
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160107/c0ae900d/attachment.html>

More information about the swift-evolution mailing list