[plt-scheme] levels of access to object fields

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Fri Jan 19 03:25:40 EST 2007

At Thu, 18 Jan 2007 08:54:10 -0500, Prabhakar Ragde wrote:
> Matthew Flatt wrote:
>  > At Thu, 18 Jan 2007 06:33:49 -0500, Prabhakar Ragde wrote:
>  >> Is it possible to make a field of an object that is accessible to
>  >> objects of the same class but otherwise private?
>  >
>  > Use `define-local-member-name':
> So is it idiomatic to do this every time I want to implement some binary 
> operation on two objects of the same class (say, some sort of loose 
> equality or comparison) while preserving information-hiding?

That's what I do. But `define-local-member-name' usually ends up at a
module top level, because I'm usually only interested in hiding
information from outside the module.


Posted on the users mailing list.