[swift-evolution] Yet Another Access Control Pitch: Flexible Scoping

Ben Langmuir blangmuir at apple.com
Fri Apr 14 23:16:43 CDT 2017

Hi Erica,

I think this proposal needs to address how allowing arbitrary identifiers to become declaration modifiers would work during parsing.  Custom accessgroups may not be in the same file - or even module - as the code they effect, meaning that

func myFunction() {}

cannot be parsed into anything reasonable until we’ve first found all of the visible accessgroup declarations.  It’s even worse when we do syntax-only parsing like we use for some IDE stuff (e.g. syntax colouring, code-folding). In that case we do not import any modules (not even the stdlib), and we are only looking at one file, not the full set of files in the module.


> On Apr 14, 2017, at 1:58 PM, Erica Sadun via swift-evolution <swift-evolution at swift.org> wrote:
> Pull request: https://github.com/apple/swift-evolution/pull/681 <https://github.com/apple/swift-evolution/pull/681>
> Under the assumption that SE-0169 is adopted, Jeffrey B and I have been brainstorming about what a follow-on might look like. We want to address concerns that remain post-0169. Although this proposal is primarily additive, we feel it might just squeak in under Swift 4's gate as it targets potentially harmful language issues.
> We appreciate your feedback about the substance of the proposal. At this time, we're not looking for bikeshedding on design details. We will welcome that once the question of whether the proposal is sufficiently substantive is settled.  
> Given the extremely limited timeline and the high volume of list traffic, we're looking for specific concerns (or benefits) you see in this pitch instead of a flurry of "+1" and "-1" responses . Our primary question regards whether this is a suitable approach (it is strongly influenced by SE-0077) and flexible enough to cover at least some outstanding concerns raised in list threads over the past weeks.
> Thank you in advance for your feedback,
> -- Erica
> _______________________________________________
> 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/20170414/36ca02ff/attachment.html>

More information about the swift-evolution mailing list