[plt-scheme] A macro for declaring class properties, a question

From: Grant Rettke (grettke at acm.org)
Date: Thu Oct 18 09:43:04 EDT 2007

On 10/18/07, Noel Welsh <noelwelsh at gmail.com> wrote:
> Something like this would do:
> (define-syntax property
>   (syntax-rules ()
>     [(_ name)
>      (begin (field super-secret-field-name)
>             (define/public name
>               (case-lambda
>                 [() super-secret-field-name]
>                 [(value) (set! super-secret-field-name value)])))]))

I'm confused about the hygiene here. Wouldn't the class end up having
duplicate field names 'super-secret-field-name', or are those made
clean when referenced by the class?

Posted on the users mailing list.