[swift-evolution] [swift-evolution-announce] [Review] SE-0025 Scoped Access Level
Patrick R. Gili
gili.patrick.r at gili-labs.com
Sun Feb 28 07:35:11 CST 2016
> What is your evaluation of the proposal?
This proposal definitely fills a gap in the access control scheme currently supported by Swift. It seems somewhat unfortunate that "private" refers to the the level of access control limiting the scope to the source file, as it seems this keyword would be better associated with the scope of access described in this proposal. I'd personally like to see "private" reassigned to the lexical scope and come up with a new keyword to describe the source file scope (e.g., maybe "file"). However, this would increase impact of the change.
> Is the problem being addressed significant enough to warrant a change to Swift?
For framework developers, the problem is significant. I'm sure application developers may have a difficult time considering this a problem.
> Does this proposal fit well with the feel and direction of Swift?
Yes, I think this is fits well with the direction of Swift. I have seen some people raise the question of the proposal adding undue complexity to the language. However, I disagree with this, as the proposal adds a single keyword associated with a new scope of access control.
> If you have used other languages or libraries with a similar feature, how do you feel that this proposal compares to those?
Many object-oriented languages support access control to members of entities. Apple went further by adding a scope of access for Swift's notion of a "module", which I have never seen any language provide. In doing so, I think they overlooked the need for the a level of access control typically described by "private". Or, Apple envisioned the one entity to a source file, like Java.
> How much effort did you put into your review? A glance, a quick reading, or an in-depth study?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-evolution