I'm playing around with the object-oriented subset of Racket, and have a couple of questions.<br><br>Ideally, I'd like to equip a class with a field that is visible only to it and its subclasses. As far as I can tell, though, this isn't possible. It seems that I have to make a choice between a completely private field visible only to the class (by just using "define") or making a completely public field (by using "field"). Correct?<br>
<br>Now, let's say I make the field public.<br><br>In the subclass, how do I change the default value of field?<br><br>For example, in the superclass, I might have<br>(field [a 300])<br><br>but in the subclass, I want to do something like<br>
(inherit-field [a 200])<br><br>However, as far as I can tell, the syntax doesn't support anything other than<br>(inherit-field a)<br><br>Thanks,<br><br>Mark<br>