<br><br><div class="gmail_quote">On Tue, Dec 8, 2009 at 17:32, Laurent <span dir="ltr"><<a href="mailto:laurent.orseau@gmail.com">laurent.orseau@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
And, BTW, despite the use of `define-syntax-rule', when omitting the `source' argument in the `init-field-clone' definition,<br>the form still works but becomes non-hygienic! Now I have to completely rewire my brain again...<br>
<br></blockquote><div><br>More exactly:<br>`source' can be omitted from the arguments:<br><br><blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex; font-family: courier new,monospace;" class="gmail_quote">
(define-syntax-rule (init-field-clone [var val] ...)<br> (begin<br> (init [source #f])<br> (init-field [var (if source (get-field var source) val)] ...)))<br></blockquote><br>it seems that `source' is inaccessible, but then it cannot be used as a field anymore:<br>
</div></div><br><blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex; font-family: courier new,monospace;" class="gmail_quote">> (define c1%<br> (class object%<br>
(init-field-clone [source "z"])<br> (super-new)<br> ))<br>error: class: duplicate declared external init name in: source<br></blockquote><br>how can this be if the macro is hygienic?<br>Well, of course, if it were completely internalized, I could not instantiate c1% with `new'...<br>
Does that means that it is `init' or `init-field' that are non-hygienic?<br><br><br>