[swift-evolution] Type-based ‘private’ access within a file
Vladimir.S
svabox at gmail.com
Thu Apr 6 14:02:01 CDT 2017
On 06.04.2017 21:40, Jordan Rose via swift-evolution wrote:
>
>> On Apr 6, 2017, at 11:35, Nevin Brackett-Rozinsky via swift-evolution
>> <swift-evolution at swift.org <mailto:swift-evolution at swift.org>> wrote:
>>
>> On Thu, Apr 6, 2017 at 2:17 PM, Jordan Rose via swift-evolution
>> <swift-evolution at swift.org <mailto:swift-evolution at swift.org>> wrote:
>>
>>
>> We accepted SE-0025, though I wish we hadn't; we named the two levels
>> "private" and "fileprivate", though I wish we hadn't; and now there
>> is lots of existing code relying on that, and it would be mean and
>> capricious to force people to change that code when they migrated to
>> Swift 4. I don't like where we ended up but Swift does not exist in a
>> vacuum.
>>
>>
>> I hardly think it is “mean” or “capricious” to provide a *fully automated
>> migrator* to make the keywords better.
>>
>> The discussion of SE-0159 reached a near-consensus that the access levels
>> should be spelled “private” and “scoped”.
>>
>> I was shocked and dismayed that the core team did anything other than
>> enthusiastically adopt that resolution.
>
> I didn't get the sense of a "near-consensus", but one concern that I don't
> remember being brought up on list was that it would make mixing Swift 3 and
> Swift 4 much more confusing (including when dealing with sample code
> snippets found online).
Probably this is why core team should raise a draft/pitch/review directly
for that subject(renaming) and got the community's reply on it?
(I believe the response will be very positive)
As for mixing Swift3 and Swift4 and other drawbacks, they also could be
discussed during the review of concrete subject(renaming) and IMO good
solution can be found or decided that such drawbacks worth of these
changes. At the end, this should make Swift better for long period of time,
should fix the mistake, should(as I can see it currently) fits well with
submodules, but drawbacks(other solutions also has their own drawbacks)
will exist only during the adoption period. Especially given this is "the
last chance to change anything in access modifiers".
>
> Jordan
>
>
>
> _______________________________________________
> 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