[swift-evolution] Swift evolution proposal: introduce typeprivate access control level
Gonçalo Alvarez Peixoto
goncalo.alvarezpeixoto at gmail.com
Tue Nov 29 11:32:09 CST 2016
Thanks for your feedback.
I do suggest an alternative, in which *typeprivate *replaces file private,
since I believe that having the scope of a member limited by file scope
does does fall short in fitting a language design purpose, as file is a
compiler related construct which could, in turn, be replaced somewhere in
time, thus leaving the “fileprivate” access member orphaned.
I should not be accessed from another module, since that's what *internal*
is for. *typeprivate *would still create a private context.
2016-11-29 16:16 GMT+00:00 Tino Heth <2th at gmx.de>:
> As you pointed out, Swift already has quite a lot access levels…
> Comparing the usefulness, "typeprivate" would clearly win over (Swift 3)
> "private" for me — but it adds a "new dimension" to the game, and I guess
> this will be a dealbreaker:
> Should it be possible to access typeprivate data from another module in an
> extension or subclass?
> - Tino
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-evolution