[swift-evolution] SE-0025: Scoped Access Level, next steps

David Waite david at alkaline-solutions.com
Mon Mar 28 14:43:04 CDT 2016


> On Mar 28, 2016, at 12:41 PM, Matt Whiteside via swift-evolution <swift-evolution at swift.org> wrote:
> 
> If the following parenthesized access keywords are still on the table as an option,
> 
>> On Mar 27, 2016, at 14:31, Haravikk via swift-evolution <swift-evolution at swift.org <mailto:swift-evolution at swift.org>> wrote:
>> 
>> 	public				as-is, item is public/exported outside of module
>> 	private(module) or private	current internal, item is private to this module, would be the default
>> 	private(file)			current private, item is private to this file
>> 	private(scope)			new visibility type, item is private to the current scope
> 
> 
> 
> I would prefer them over these ones:
> 
> 	public
>         moduleprivate
>         fileprivate
>         private
> 
> To my eyes, the parenthesized ones are more readable and understandable.

+1 to paren syntax for readability, private(module) being the default if nothing declared, private with no parenthesized access keyword can default to either file or scope.

-DW
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160328/63ecd90d/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 496 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160328/63ecd90d/attachment.sig>


More information about the swift-evolution mailing list