<br><br><div><span class="gmail_quote">On 10/18/07, <b class="gmail_sendername">Grant Rettke</b> <<a href="mailto:grettke@acm.org">grettke@acm.org</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On 10/18/07, Noel Welsh <<a href="mailto:noelwelsh@gmail.com">noelwelsh@gmail.com</a>> wrote:<br>> Something like this would do:<br>><br>> (define-syntax property<br>> (syntax-rules ()<br>> [(_ name)
<br>> (begin (field super-secret-field-name)<br>> (define/public name<br>> (case-lambda<br>> [() super-secret-field-name]<br>> [(value) (set! super-secret-field-name value)])))]))
<br><br>I'm confused about the hygiene here. Wouldn't the class end up having<br>duplicate field names 'super-secret-field-name', or are those made<br>clean when referenced by the class?</blockquote><div><br>
Probably the best introduction to what is going on here is in<br><pre>JRM's Syntax-rules Primer for the Merely Eccentric at <br><a href="http://www.xs4all.nl/~hipster/lib/scheme/gauche/define-syntax-primer.txt">http://www.xs4all.nl/~hipster/lib/scheme/gauche/define-syntax-primer.txt
</a></pre><br><br> </div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">_________________________________________________<br> For list-related administrative tasks:
<br> <a href="http://list.cs.brown.edu/mailman/listinfo/plt-scheme">http://list.cs.brown.edu/mailman/listinfo/plt-scheme</a><br></blockquote></div><br>