<div dir="ltr">Well. I really would like to see something like this in Swift:<div><br></div><div><font face="monospace, monospace">public(open|closed)</font></div><div><font face="monospace, monospace">protected // (yes, we and Cocoa still use classes)</font></div><div><font face="monospace, monospace">internal</font></div><div><span style="font-family:monospace,monospace">private(file)</span><br></div><div><br></div><div>I would like the <font face="monospace, monospace">abstract</font> modifier to any access level because, well... We and Cocoa still use classes. ;) It could be something like <font face="monospace, monospace">protected(abstract)</font> (I’m getting the syntax from <font face="monospace, monospace">private(set)</font> thing).</div><div><br></div><div>The <font face="monospace, monospace">fileprivate</font> addition meaning the previous `private` was a mess (after we accustomed to the <font face="monospace, monospace">private</font> Swift’s semantic since access levels were introduced). And the <font face="monospace, monospace">open</font> keyword as it was implemented in Swift 3.x makes code like <font face="monospace, monospace">open func close() { .. }</font> difficult to understand for a newbie and ugly for a experienced programmer.</div><div><br></div><div><font face="monospace, monospace">final</font> and <font face="monospace, monospace">lazy</font> are good as they are today.</div><div><br></div><div>My 2 cents.</div><div><br></div><div><br></div><div>Regards,</div><div><br></div><div>Vanderlei Martinelli</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Feb 12, 2017 at 2:19 PM, David Hart via swift-evolution <span dir="ltr"><<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto"><div><span></span></div><div>I was reading this nice listing of Swift keywords (<a href="https://medium.com/the-traveled-ios-developers-guide/swift-keywords-v-3-0-1-f59783bf26c#.2s2yis3zh" target="_blank">https://medium.com/the-<wbr>traveled-ios-developers-guide/<wbr>swift-keywords-v-3-0-1-<wbr>f59783bf26c#.2s2yis3zh</a>) and three of them struck me as potentially not long for this world and I was thinking if we needed/could deprecate them before any kind of ABI stability set in.<div><br></div><div>I'm listing them here but it might be worth starting separate discussions for each of them.<br><div><br></div><div><b>Final</b></div><div><br></div><div>Can someone tell me what is the use of 'final' now that we have 'public' default to disallowing subclassing in importing modules? I know that 'final' has the added constraint of disallowing subclassing in the same module, but how useful is that? Does it hold its weight? Would we add it now if it did not exist?</div><div><br></div><div><b>Lazy</b></div><div><br></div><div>This one is clearer: if Joe Groff's property behaviors proposal from last year is brought forward again, lazy can be demoted from a language keyword to a Standard Library property behavior. If Joe or anybody from the core team sees this: do we have any luck of having this awesome feature we discussed/designed/implemented in the Swift 4 timeframe?</div><div><br></div><div><b>Fileprivate</b> </div><div><br></div><div>I started the discussion early during the Swift 4 timeframe that I regret the change in Swift 3 which introduced a scoped private keyword. For me, it's not worth the increase in complexity in access modifiers. I was very happy with the file-scope of Swift pre-3. When discussing that, Chris Latner mentioned we'd have to wait for Phase 2 to re-discuss it and also show proof that people mostly used 'fileprivate' and not the new 'private' modifier as proof if we want the proposal to have any weight. Does anybody have a good idea for compiling stats from GitHub on this subject? First of all, I've always found the GitHub Search quite bad and don't know how much it can be trusted. Secondly, because 'private' in Swift 2 and 3 have different meanings, a simple textual search might get us wrong results if we don't find a way to filter on Swift 3 code.</div></div><div><br></div><div>Thanks for hearing me out!</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>David.</div></font></span></div></div><br>______________________________<wbr>_________________<br>
swift-evolution mailing list<br>
<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a><br>
<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" target="_blank">https://lists.swift.org/<wbr>mailman/listinfo/swift-<wbr>evolution</a><br>
<br></blockquote></div><br></div>