#|Hello all, <br><br>I&#39;m looking to define a macro that extends the forms within a racket/class class%. In particular, I would like a form to define a C# like class language form property, that implements the getters and setters for an initialized field automatically. <br>
<br>I&#39;m guessing that someone has written this before however. Can anyone assist with macros that expand into class fields and methods? Ideally, I&#39;d like to move to syntax-parse. |#<br><br>(define-syntax (define-property syntax)<br>
  (syntax-parse syntax<br>                [((~literal define-property) name:id init-value)<br>                 <br>                 #&#39;(define name init-value)<br>                 (define/public (set-name! init-value)<br>
                   (set! name init-value))<br>                 (define/public (get-name)<br>                       name)]))<br>&gt;<br>define/public: use of a class keyword is not in a class top-level in: (define/public (set-name! init-value) (set! name init-value))<br>