<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">Hi David</div><div class=""><br class=""></div>jikes! You’re right, total blunder. I should do my homework better :o) <div class="">I have been using Java before, be it with the assumption that it had private scope</div><div class="">for class members, because of the line of PLs I was using before I started using Java</div><div class="">I went on programming assuming that it had, which never led to scope conflicts because</div><div class="">of programming consequently within this assumption, so, I never noticed this. :o) </div><div class=""> </div><div class="">This is because in most PLs in my history Fortran -> Cobol-> PL/1 -> Pascal -> Modula -></div><div class="">C -> C++ consistent lexical scope is present (since ca. 1960 with Algol) </div><div class="">After that C# (nice language too, which has it) and ObjC (which hasn’t) and Smalltalk for many years</div><div class="">which has (needs) no scope modifiers at all (in a class all methods are not private</div><div class="">but variables are.) </div><div class=""><br class=""></div><div class="">Sorry for the incorrect assumptions. </div><div class="">Nevertheless I hold on to my point of view that there should be lexical scope only in Swift,</div><div class="">(as Swift being a procedural/OOP language) </div><div class="">however rigidly enforcing this in Swift 4 would be probably too much of a change now.</div><div class=""><br class=""></div><div class="">I do not understand what is so hard on private-by-default? (that is, if used</div><div class="">this way right from the beginning of writing an application, </div><div class="">(provided a program language is set up that way)</div><div class=""><br class=""></div><div class="">TedvG</div><div class=""><a href="http://www.tedvg.com" class="">www.tedvg.com</a><br class=""><div><blockquote type="cite" class=""><div class="">On 4. Apr 2017, at 22:17, David Waite <david@alkaline-solutions.com> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Apr 4, 2017, at 7:07 AM, Ted F.A. van Gaalen via swift-evolution <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class=""><font face="AvenirNext-Regular" class="">Hi Xiaodi,</font></div><div class=""><font face="AvenirNext-Regular" class=""><br class=""></font></div><div class=""><font face="AvenirNext-Regular" class="">that currently all members of a class or struct are exposed by default by having</font></div><div class=""><font face="AvenirNext-Regular" class="">a default scope of ‘internal’ and are therefore accessible in the entire module</font></div><div class=""><font face="AvenirNext-Regular" class="">is imho very bad unstructured programming practice. </font></div><div class=""><font face="AvenirNext-Regular" class=""><br class=""></font></div><div class=""><font face="AvenirNext-Regular" class="">In no other OOP language it is implemented</font></div><div class=""><font face="AvenirNext-Regular" class="">that way.. </font></div></div></div></blockquote><div class=""><br class=""></div>I think you may be forgetting Java (and Ruby, and Python, and Go, and Objective-C, and…)</div><div class=""><br class=""></div><div class="">In my experience , the hard-private-by-default comes from C++ and heavily influenced languages like C# and Rust.</div><div class=""><br class=""></div><div class="">-DW</div></div></div></blockquote></div><br class=""></div></body></html>