[swift-evolution] final + lazy + fileprivate modifiers

Goffredo Marocchi panajev at gmail.com
Sun Feb 19 03:20:07 CST 2017


Coming from any other modern language has a much harsher friend in default methods in protocol extensions and having code execution once again depend on the reference type in those cases and no protection to tell you that your code is at risk of this occurring (your class method only called if you use the class type to reference the created instance).

The current private is closer to other languages than the previous one we had which now has in fileprivate a better name.

Sent from my iPhone

> On 19 Feb 2017, at 08:12, Rien via swift-evolution <swift-evolution at swift.org> wrote:
> 
> A parabel: Nobody is going to invest a week of his time so save $1 of taxes per year. Yet somebody who receives those millions of dollars will invest -if need be- all of his time to keep it coming. Guess who wins?
> 
> Same with private. There is no BIG harm. But a great many of very little minor ones. Learning swift, increased cognitive load during programming, mistakes to be corrected, difficulty in testing, and I am sure many more can be found.
> 
> Regards,
> Rien
> 
> Site: http://balancingrock.nl
> Blog: http://swiftrien.blogspot.com
> Github: http://github.com/Balancingrock
> Project: http://swiftfire.nl
> 
> 
> 
> 
> 
>> On 19 Feb 2017, at 07:57, Jose Cheyo Jimenez via swift-evolution <swift-evolution at swift.org> wrote:
>> 
>> How exactly is the use of scope private harmful? 
>> 
>> Do you have specific examples when scope private was harmful?
>> 
>> 
>> 
>>> On Feb 18, 2017, at 9:06 PM, Zach Waldowski via swift-evolution <swift-evolution at swift.org> wrote:
>>> 
>>> On Fri, Feb 17, 2017, at 07:52 PM, Jose Cheyo Jimenez via swift-evolution wrote:
>>>> I don’t think there is evidence that scope private in Swift3 is "actively harmful”. 
>>>> 
>>> 
>>> This thread would quite simply not exist if not to present exactly that evidence. It exists; we, the change's detractors, exist.
>>> 
>>> Zachary
>>> 
>>> _______________________________________________
>>> swift-evolution mailing list
>>> swift-evolution at swift.org
>>> https://lists.swift.org/mailman/listinfo/swift-evolution
>> 
>> _______________________________________________
>> swift-evolution mailing list
>> swift-evolution at swift.org
>> https://lists.swift.org/mailman/listinfo/swift-evolution
> 
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution


More information about the swift-evolution mailing list