[swift-evolution] [Rejected] SE-0009 Require self for accessing instance members

Honza Dvorsky jan.dvorsky at me.com
Wed Jan 6 12:00:22 CST 2016

Thanks Trent, I created an issue an there seems to be will to add it as an
opt-in rule: https://github.com/realm/SwiftLint/issues/321

Greg and Doug, thanks for the details, I didn't realize that there aren't
any language flags yet. In that case, I agree that moving this
responsibility to a tool higher up the chain makes sense. And hopefully
having to install a linter won't be an issue for developers going forward.
On Wed, Jan 6, 2016 at 6:47 PM Douglas Gregor <dgregor at apple.com> wrote:

> > On Jan 6, 2016, at 6:56 AM, Greg Parker via swift-evolution <
> swift-evolution at swift.org> wrote:
> >
> >
> >> On Jan 6, 2016, at 6:17 AM, Honza Dvorsky via swift-evolution <
> swift-evolution at swift.org> wrote:
> >>
> >> I remember this being discussed in the conversation about this proposal
> and I haven't seen anyone being *against* there being a compiler flag,
> assuming it's off by default.
> >
> > We don't want language-changing compiler flags. swiftc doesn't even have
> flags to control warnings today, though I don't know if we'll be able to
> preserve that forever.
> >
> > Style rules should be enforced by tools other than the compiler.
> I tend to agree with Greg, in part because I don’t like the idea of having
> a cornucopia of potentially-conflicting warning flags for different coding
> conventions within the compiler proper (e.g., -Wimplicit-self vs.
> -Wunnecessarily-qualified-self, for the opposite ends of the spectrum in
> this particular debate).
> The core team did talk about such a warning flag briefly, and there was no
> consensus either way. We think this needs more discussion in the community,
> but not as a discussion specific to requiring “self.”. Rather, the question
> is “does checking of coding conventions belong in the Swift compiler or in
> a separate tool?” and “how do we decide which coding conventions are
> important/popular/useful enough to include?”
>         - Doug
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160106/9e9cd80b/attachment.html>

More information about the swift-evolution mailing list