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

Charles Srstka cocoadev at charlessoft.com
Wed Jan 6 13:18:12 CST 2016


> On Jan 6, 2016, at 8: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 <mailto: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 just spent a half hour last night debugging an issue that turned out to be caused by something getting written to a property which I thought was being written to a local variable, due to implicit self.

Clang had compiler flags to enforce specific stylistic rules, such as -Wobjc-missing-property-synthesis for those who disliked the auto-synthesis feature (and I never even understood that particular objection). It seems to me that this compiler warning would be at least as acceptable as that.

Charles

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160106/934945ae/attachment.html>


More information about the swift-evolution mailing list