sorry, hit "Sent" too early On 30 October 2017 at 16:34, Adam Kemp <adam_k...@apple.com> wrote:
> > I didn’t mean “no, you can’t do that”. You can if you want to. What I > meant was “no, I’m not suggesting that you should do that”. I don’t think > it’s necessary. > as you said before the benefit of keeping private things private is minimizing the amount of code that can break once you change a variable. if it's "internal" - the whole module must be checked. if it is "internal" rather than "private": - it is done because otherwise i'd have to keep the (big) class in a single file - shows the limitation in the language in regards to one-file-class vs multi-file-class - forces me to use one module per file if I want to mimic the "private" keyword as close as possible - or forces me to keep my class in a single file. > Which other language has an access level like the one being proposed? i am not aware of such a language. C++'s "private" comes close as it can be used in multiple files but then C++ doesn't have extensions. C++ "protected" comes close for something I can use in subclasses. Mike
_______________________________________________ swift-evolution mailing list swift-evolution@swift.org https://lists.swift.org/mailman/listinfo/swift-evolution