[plt-scheme] protected members in class.ss?

From: Robby Findler (robby at cs.uchicago.edu)
Date: Sun Jul 30 22:16:14 EDT 2006

At Sun, 30 Jul 2006 19:55:29 -0400, Jon Rafkind wrote:
> Hi,
>     I was wondering if there was some way to make a method "protected"
> like in C++ and Java wherein a method can only be called by sub-classes.
> I read the documentation for class.ss forwards and backwards but didnt
> find it.

There isn't protected ala Java per se, but you can achieve the effect
of hiding certain methods (only allowing them in certain scopes) via
define-local-member-name. It's a different mechanism, but should help
you do what you want (ie, encapsulate).

hth,
Robby


Posted on the users mailing list.