[plt-scheme] levels of access to object fields
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? Or do
people just make fields public and not worry about it? --PR