<br><div><span class="gmail_quote">On 9/6/07, <b class="gmail_sendername">Eli Barzilay</b> &lt;<a href="mailto:eli@barzilay.org">eli@barzilay.org</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>&gt; The classes that you get from `struct-type-&gt;class&#39; are intended for<br>&gt; generic function dispatching only.&nbsp;&nbsp;Making &lt;make&gt; work with these will<br>&gt; require much more work.</blockquote><div><br>
Yeah I&#39;m finding that out the hard way :) <br><br>As written in the message <a href="http://list.cs.brown.edu/pipermail/plt-scheme/2007-September/020471.html">http://list.cs.brown.edu/pipermail/plt-scheme/2007-September/020471.html
</a>, I am able to get the initial part going by <br><br>1) modify extra.ss to export struct-type-&gt;class* <br>2) wrap around define-struct* and struct-type-&gt;class* <br><br>but I ran into a few issues and have some questions:
<br><br>1) why does a procedurized struct returns a swindle instance if called via &lt;make&gt;?&nbsp; struct-type-&gt;class appear to catch whether a struct-type is procedure and changes the super class to &lt;procedure-class&gt;, but why do that when the returned instance cannot be called as a procedure?
<br><br>2) Also, it appears that procedurized struct cannot be inherited in swindle object system.&nbsp; Trying to do so either with my hacks or with struct-type-&gt;class would raise an error: <br><br>; with the sample code in
<a href="http://list.cs.brown.edu/pipermail/plt-scheme/2007-September/020471.html">http://list.cs.brown.edu/pipermail/plt-scheme/2007-September/020471.html</a><br>&gt; (defstruct* &lt;foo1&gt; (value)<br>&nbsp; (#:guard (lambda (value struct)
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (values value)))<br>&nbsp; (#:procedure (lambda (x) x)))<br>&gt; (defstruct* (&lt;foo2&gt; &lt;foo1&gt;) ())<br>. . collects\swindle\tiny-clos.ss::7069: top-sort: invalid constraints<br><br>Looking through the code it&#39;s not obvious where the constraint is created, but I am assuming that the design is that a procedure has a constraint that it cannot be inherited - correct?&nbsp; If such struct cannot be inherited it would seem to limit generic function applicabilities.
<br><br>3) if such integration is too far-fetched right now - does swindle integrate well with non swindlized structs? <br><br>Any pointers are appreciated. Thanks! ;)<br>yc<br><br><br></div></div>