[swift-evolution] Swift evolution proposal: introduce typeprivate access control level
2th at gmx.de
Fri Dec 2 04:41:30 CST 2016
> And the funny thing is, we don’t actually _need_ access control levels.
That is true (but actually, there isn't much that is really needed ;-)
[Months ago, I've been thinking of proposing a system that is backed by private/public key cryptography — just to make fun of some overstated plans ;-) ]
My very own opinion is that Swift doesn't need a more sophisticated model — it just should have a good ratio of complexity and power.
By accepting the change of meaning for "private" and adding a fourth level, imho we gave up on simplicity in favour for theoretical benefits, and mixed concerns (ability to call vs. ability to override) with "open".
So, the current system is quite complex, yet it lacks power…
An ACL-like scheme would even be a little bit more complex, but add a significant amount of expressiveness, so I'd prefer it over the status quo.
The decision between ACL and "private, internal, public" would be much harder, though — but afaics, the majority aims for one of the extremes, so we'll most likely have to live with a compromise here.
> It seems to me that in almost all discussions the arguments are mostly backwards: i.e. formulated from the perspective of the API users.
Can you elaborate on this and point out examples?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-evolution