class.ss
(module class mzscheme
  (require (lib "class.ss"))

  (define-syntax init-private/h
    (syntax-rules ()
      [(_ decl)
       (begin)]
      [(_ decl (name default-value) clause ...)
       (begin
         (decl ((internal-name name) default-value))
         (define name internal-name)
         (init-private/h decl clause ...))]
      [(_ decl name clause ...)
       (begin
         (decl ((internal-name name)))
         (define name internal-name)
         (init-private/h decl clause ...))]))

  (define-syntax init-private
    (syntax-rules ()
      [(_ args ...)
       (init-private/h init args ...)]))

  (define-syntax init-private-field
    (syntax-rules ()
      [(_ args ...)
       (init-private/h init-field args ...)]))

  (define-syntax method
    (syntax-rules ()
      [(_ object-exp method-name)
       (lambda args (send/apply object-exp method-name args))]))

  (provide init-private init-private-field method))