So I have been trying to learn the ins and outs of Racket's class system.  I've 
a little puzzled when it comes to the "inherit"-forms.  I've poured over the 
Racket Reference and fiddled with some experimental classes, but I'm still not 
clear.

My questions specifically are, What is the difference between inherit and 
inherit/super, and how does inherit/inner work?

Below is a link to the page with the documentation in the Racket reference that 
I'm trying to understand, along with the pertinent paragraphs.

Any help would be appreciated.  Thanks!

--Christopher


http://docs.racket-lang.org/reference/createclass.html?q=class&q=arg-list-expr&q=define-values&q=contract-out&q=hash/c&q=match&q=cond&q=match&q=set-hash%21&q=let-values&q=list/c&q=is-a&q=listof&q=subclass&q=class/c&q=make-string&q=hash%3F&q=init-field&q=class/c&q=-%3E&q=chaperone&q=pos&q=positive&q=goto-line

> 5.2.3.2 Inherited and Superclass Methods
> 
> Each inherit, inherit/super, inherit/inner, rename-super, and 
> rename-innerclause declares one or more methods that are defined in the 
> class, but must be present in the superclass. The rename-super and 
> rename-inner declarations are rarely used, since inherit/super and 
> inherit/inner provide the same access. Also, superclass and augmenting 
> methods are typically accessed through super and inner in a class that also 
> declares the methods, instead of through inherit/super, 
> inherit/inner,rename-super, or rename-inner.
> 
> Method names declared with inherit, inherit/super, or inherit/inner access 
> overriding declarations, if any, at run time. Method names declared 
> withinherit/super can also be used with the super form to access the 
> superclass implementation, and method names declared with inherit/inner can 
> also be used with the inner form to access an augmenting method, if any.



____________________
  Racket Users list:
  http://lists.racket-lang.org/users

Reply via email to