3 ms·
It's like "protected" access, in Java's terms. Subclasses can't access the default members in Java. That is why it is so rarely used. It was oddly restrictive,
by millerm 12y ago
It's like "protected" access, in Java's terms. Subclasses can't access the default members in Java. That is why it is so rarely used. It was oddly restrictive, and didn't seem like it made much sense in most cases. I don't find this as a bad decision, in Swift. Since you don't normally want to expose the internals of your classes, this was a good choice.
http://docs.oracle.com/javase/tutorial/java/javaOO/accesscontrol.html http://docs.oracle.com/javase/tutorial/java/javaOO/accesscon...
- hammerdr 12y agoI think you might have gotten it wrong? I think it (Swift's internal/default) is more like "package-private" in Java. It looks almost exactly like C#'s internal: http://msdn.microsoft.com/en-us/library/ms173121.aspx http://msdn.microsoft.com/en-us/library/ms173121.aspx
- masters3d 12y agoChrisLattner talks about the java in this recent post if you have access to the apple dev site. https://devforums.apple.com/message/1010693#1010693 https://devforums.apple.com/message/1010693#1010693 …