<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
</head>
<body>
<div name="messageBodySection">I believe Chris stated he was fine with options that enforced existing syntax, just not ones that changed the grammar.<br />
<br />
In this case, code would compile without the flag regardless of whether or not it was originally written with the flag.<br />
<br />
I believe it was also stated that some sort of attribute in the file was preferred over a compiler flag, which definitely seems like a good idea to me.</div>
<div name="messageSignatureSection"><br /></div>
<div name="messageReplySection"><br />
On Dec 14, 2015, 09:29 -0600, Jeremy Pereira via swift-evolution <swift-evolution@swift.org>, wrote:<br />
<blockquote type="cite"><br />
<blockquote type="cite">On 14 Dec 2015, at 09:01, Andrew Brown via swift-evolution <swift-evolution@swift.org> wrote:<br />
<br />
This discussion isn't going to be solved quickly so +1 for a compiler flag.<br />
I'd propose the flag generates an error if member variables are accessed without self.<br /></blockquote>
<br />
I’d propose it only be a warning. The reason for this is that Chris Lattner, in an unrelated thread, expressed an aversion to compiler flags that create different dialects of the language and I agree with him.<br />
<br />
<br />
<blockquote type="cite">Then after some time we can survey the community (or scan GitHub) to see how many people use the flag.<br />
(making it a preference in Xcode would also help)<br />
<br />
ABR.<br />
<br />
<blockquote type="cite">On 14 Dec 2015, at 07:12, David Hart via swift-evolution <swift-evolution@swift.org> wrote:<br />
<br />
<br />
<blockquote type="cite">On 13 Dec 2015, at 22:45, Charles Srstka via swift-evolution <swift-evolution@swift.org> wrote:<br />
<br />
Since opinions seem to be divided on this, how about adding an optional warning flag to the compiler, which would warn if one accessed an instance variable or method without self. in front?<br /></blockquote>
<br />
That is a good alternative.<br />
_______________________________________________<br />
swift-evolution mailing list<br />
swift-evolution@swift.org<br />
https://lists.swift.org/mailman/listinfo/swift-evolution<br /></blockquote>
_______________________________________________<br />
swift-evolution mailing list<br />
swift-evolution@swift.org<br />
https://lists.swift.org/mailman/listinfo/swift-evolution<br /></blockquote>
<br />
_______________________________________________<br />
swift-evolution mailing list<br />
swift-evolution@swift.org<br />
https://lists.swift.org/mailman/listinfo/swift-evolution<br /></blockquote>
</div>
</body>
</html>