[plt-scheme] A macro for declaring class properties, a question
On 10/18/07, Matthias Felleisen <matthias at ccs.neu.edu> wrote:
> No. See macro-stepper.
I got an error "class*: duplicate declared external field name in:
super-secret-field-name"
when I tried the following:
(module test mzscheme
(require (lib "class.ss"))
(provide (all-defined))
(define-syntax property
(syntax-rules ()
[(_ name)
(begin
(field (super-secret-field-name null))
(define/public name
(case-lambda
[() super-secret-field-name]
[(value) (set! super-secret-field-name value)])))]))
(define service-call%
(class* object% ()
(property customer-name)
(property customer-id)
(super-new))))