[swift-evolution] final + lazy + fileprivate modifiers

Zach Waldowski zach at waldowski.me
Mon Feb 13 12:40:49 CST 2017


I still haven't been convinced by this. What are these incredibly large
files that people are dealing with, and why should a crucial feature of
the language be built around servicing anti patterns?


Zachary



On Mon, Feb 13, 2017, at 01:26 PM, William Sumner via swift-evolution wrote:
> 

>> On Feb 12, 2017, at 9:19 AM, David Hart via swift-evolution <swift-
>> evolution at swift.org> wrote:
>> 

>> 

>> *Fileprivate* 

>> 

>> I started the discussion early during the Swift 4 timeframe that I
>> regret the change in Swift 3 which introduced a scoped private
>> keyword. For me, it's not worth the increase in complexity in access
>> modifiers. I was very happy with the file-scope of Swift pre-3. When
>> discussing that, Chris Latner mentioned we'd have to wait for Phase 2
>> to re-discuss it and also show proof that people mostly used
>> 'fileprivate' and not the new 'private' modifier as proof if we want
>> the proposal to have any weight. Does anybody have a good idea for
>> compiling stats from GitHub on this subject? First of all, I've
>> always found the GitHub Search quite bad and don't know how much it
>> can be trusted. Secondly, because 'private' in Swift 2 and 3 have
>> different meanings, a simple textual search might get us wrong
>> results if we don't find a way to filter on Swift 3 code.
> 

> I find the “Motivation” section of SE-0025 convincing.
> Private/fileprivate allows for distinguishing between shared and
> hidden details among related code in a file. Not only is there benefit
> in knowing intent when reading, but there is also benefit in writing
> because the IDE won’t autocomplete hidden details. I work on large
> files I’m not the sole author of, so this is important to me.
> 

> Preston

> _________________________________________________

> swift-evolution mailing list

> swift-evolution at swift.org

> https://lists.swift.org/mailman/listinfo/swift-evolution


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20170213/52ae042c/attachment.html>


More information about the swift-evolution mailing list