[plt-scheme] cannot serialize classes with private methods

From: Jon Rafkind (workmin at ccs.neu.edu)
Date: Wed Aug 9 18:40:56 EDT 2006

Jon Rafkind wrote:
>> When you leave out `public', you don't get a private method. Instead,
>> you get a procedure-valued field.
> Sorry I misspoke, I tend to use private and, as you call them,
> procedure-valued fields interchangeably since I didn't see any real
> differences in them from the manual. Are there any other subtle
> differences between them?
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?

Posted on the users mailing list.