[swift-evolution] [swift-evolution-announce] [Review] SE-0189: Restrict Cross-module Struct Initializers

Drew Crawford drew at sealedabstract.com
Mon Nov 20 12:58:00 CST 2017

I'm "weak oppose" on this proposal.

The core premise here is to increase the encapsulation of a struct around its member variables.  But I think the purview of encapsulation is more classes than structs.  e.g. a struct leaks information about the mutation of its member variables, even if those variables are private.  Structs are the obvious implementation for a named tuple (CGPoint CGAffineTransform UIColor etc.) where there is inherently a fixed set of members that are more conveniently accessed directly.  Structs and classes have different purposes and so the argument for consistency with classes is weak.

With regard to the BalancedPair problem, I would prefer to see a "final struct" or "required init".
On November 14, 2017 at 1:31:25 PM, Ted Kremenek (kremenek at apple.com) wrote:

The review of "SE-0189: Restrict Cross-module Struct Initializers" begins now and runs through November 21, 2017.

The proposal is available here:

Reviews are an important part of the Swift evolution process. All review feedback should be sent to the swift-evolution mailing list at:

or, if you would like to keep your feedback private, directly to the review manager. 

When replying, please try to keep the proposal link at the top of the message:

Proposal link: https://github.com/apple/swift-evolution/blob/master/proposals/0189-restrict-cross-module-struct-initializers.md
Reply text
Other replies
What goes into a review of a proposal?

The goal of the review process is to improve the proposal under review through constructive criticism and, eventually, determine the direction of Swift. 

When reviewing a proposal, here are some questions to consider:

What is your evaluation of the proposal?

Is the problem being addressed significant enough to warrant a change to Swift?

Does this proposal fit well with the feel and direction of Swift?

If you have used other languages or libraries with a similar feature, how do you feel that this proposal compares to those?

How much effort did you put into your review? A glance, a quick reading, or an in-depth study?

Ted Kremenek
Review Manager
swift-evolution-announce mailing list
swift-evolution-announce at swift.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20171120/8de83624/attachment.html>

More information about the swift-evolution mailing list