[racket] protected (semi-private) fields
See the documentation for define-local-member-name:
http://docs.racket-lang.org/search/index.html?q=define-local-member-name
Rather than always limiting a "protected" member to a class and its
subclasses, we allow limiting them by lexical scope. That way you can
decide precisely what classes can and can't use it based on where you
put the define-local-member-name.
Carl Eastlund
On Wed, Jun 1, 2011 at 3:40 PM, Razvan Rotaru <roti_343 at yahoo.com> wrote:
> Hi,
> Question about classes in Racket: can I make fields which can be inherited
> by super-classes, but not accessible from outside the class? (like
> "protected" members in Java)
> As I understand field and init-field declarations produce public fields
> (which can be accessed from outside the class), and define produces private
> fields (which can't be inherited).
> Razvan