[swift-evolution] Swift evolution proposal: introduce typeprivate access control level

"João David (Personal)" david.joao at gmail.com
Thu Dec 1 06:29:38 CST 2016


@Tino: Regarding the following statement - "Even if there was a change of mind, fileprivate is still needed for essential things like implementing Equatable.”
How exactly is that so? Am I missing something?

> > - Typeprivate would allow to abandon the odd fileprivate. Access level would be constrained to swift constructs (structs, classes and extensions) and not to a compiler artifact (file).
> Actually, imho fileprivate isn't odd or "unswift"* — it's one of the three original levels, which all rely on the layout of the filesystem ("same file?" and "same folder/module?").
> Even if there was a change of mind, fileprivate is still needed for essential things like implementing Equatable.
> 
> But I'm not arguing against typeprivate at all (nor against access control in general ;-)
> 
> - Tino
> 
> * I tend not to use attributes like "swifty"… most of the time, it just means "I think this is the right choice"
> 
> 
>  

João David
iOS Software Architect
LinkedIn <http://pt.linkedin.com/in/joaotdavid> | +351 933631927 | Skype: joaotdavid

Please visit the iSOPARC <http://ciafel.fade.up.pt/isoparc> and iSOFIT <http://ciafel.fade.up.pt/isofit> for iPad application website.









-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20161201/3dcdb743/attachment.html>


More information about the swift-evolution mailing list