[plt-scheme] levels of access to object fields

From: Prabhakar Ragde (plragde at uwaterloo.ca)
Date: Thu Jan 18 08:54:10 EST 2007

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


Posted on the users mailing list.