[plt-scheme] cannot serialize classes with private methods

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Wed Aug 9 18:50:53 EDT 2006

At Wed, 09 Aug 2006 18:40:56 -0400, Jon Rafkind wrote:
> While reading the class.ss manual I realized why I had thought (define
> (foo) 2) was "private". In section 4.1 is an example:
> 
> (define stack% 
>   (class* |object%| (stack<%>)
>     ; Declare public methods that can be overridden:
>     (public push! pop! none?)
>     ; Declare a public method that can be augmented, only:
>     (pubment print-name)
> 
>     (define stack |null|)        ; A private field     
>     (init-field (name 'stack)) ; A public field
>     ...))
> 
> So I took (define name value) to be the way you define a private anything, be 
> it field or method.
> 
> Could the documentation be clarified a little bit?

Yes, good point.

Matthew



Posted on the users mailing list.