[swift-evolution] access control proposal

Stephen Celis stephen.celis at gmail.com
Wed Dec 9 06:07:19 CST 2015


> On Dec 9, 2015, at 6:42 AM, Ilya via swift-evolution <swift-evolution at swift.org> wrote:
> 
> For me, hiding implementation details is a fundamental feature of the language / compiler. It is possible to get by without it with coding by convention, but it’s also possible to get by without a strong type system. Having a way to hide implementation details that is enforced by the language will help to have clearly defined interfaces and limit hacks and mistakes for misusing APIs that are meant to be private.

The current implementation strikes a good balance here. Couldn’t project-specific requirements for where private variables/functions are accessed be enforced by a linter?

Stephen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20151209/98a4e690/attachment.html>


More information about the swift-evolution mailing list