[swift-evolution] SE-0025: Scoped Access Level, next steps
Brent Royal-Gordon
brent at architechies.com
Thu Mar 24 18:13:44 CDT 2016
> I think it does. `module` could mean many things related to how Swift creates and consumes modules.
> `moduleprivate` combines something about access levels (public/private) and scope (module), is easy to
> Google, offers few "wrong" interpretations. By using a longer keyword, it is less flexible in meaning and
> more fixed in purpose.
Sure, but is that worth 7 to 9 extra characters at every single use site for something that's actually pretty common? Is it worth the muddled mess of an all-lowercase keyword with no obvious break, or the attention-grabbing of a capital letter or an underscore?
`module` and `file` are not going to be obscure corners of the language. Most people will probably learn about them at the same time they learn about `public` and `private`.
(Actually, if `module` continues to be the default, you probably won't see it *that* often. You *will* see `file`, but that's the one that can't be as easily confused with a declaration.)
Obviousness for new users is great, but you can take it too far. We call the type `Int32`, not `SignedIntegerBetweenNegative2ToThe31stPowerAnd2ToThe31stPowerMinus1`—and if we did, it's not clear the longer name would really be more obvious, because it would be such a pain to read.
--
Brent Royal-Gordon
Architechies
More information about the swift-evolution
mailing list