add a note about where protected methods fit into our world
This commit is contained in:
parent
a4e72128af
commit
5848c1f5a6
|
@ -348,6 +348,13 @@ and makes the overriding implementation augmentable.
|
||||||
|
|
||||||
@section[#:tag "extnames"]{Controlling the Scope of External Names}
|
@section[#:tag "extnames"]{Controlling the Scope of External Names}
|
||||||
|
|
||||||
|
@margin-note{
|
||||||
|
Java's access control mechanisms (like @index["protected method"]{protected})
|
||||||
|
play a role similar to @racket[define-member-name], but
|
||||||
|
unlike in Java, Racket's mechanism for controlling access
|
||||||
|
is based on lexical scope, not the inheritance hierarchy.
|
||||||
|
}
|
||||||
|
|
||||||
As noted in @secref["intnames"], class members have both
|
As noted in @secref["intnames"], class members have both
|
||||||
internal and external names. A member definition binds an internal
|
internal and external names. A member definition binds an internal
|
||||||
name locally, and this binding can be locally renamed. External
|
name locally, and this binding can be locally renamed. External
|
||||||
|
|
Loading…
Reference in New Issue
Block a user