<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hello all.<div><br></div><div>I have become quite in the habit of using the following:</div><div><br></div><div><font face="Courier"><span class="Apple-tab-span" style="white-space:pre">        </span><font color="#a77b00">(</font>define/contract <i><font color="#0042aa">id</font></i></font></div><div><font face="Courier"><span class="Apple-tab-span" style="white-space:pre">        </span>&nbsp;&nbsp;<font color="#a77b00">(</font>class/c&nbsp;</font></div><div><font face="Courier"><span class="Apple-tab-span" style="white-space:pre">        </span>&nbsp; &nbsp;&nbsp;<i><font color="#0042aa">class-contract-clause</font></i> ... <font color="#a77b00">)</font>&nbsp;</font></div><div><font face="Courier"><span class="Apple-tab-span" style="white-space:pre">        </span>&nbsp;&nbsp;</font></div><div><font face="Courier"><span class="Apple-tab-span" style="white-space:pre">        </span>&nbsp;&nbsp;<font color="#a77b00">(</font>class*&nbsp;<i><font color="#0042aa">superclass-expr</font></i>&nbsp;<font color="#a77b00">()</font></font></div><div><font face="Courier"><span class="Apple-tab-span" style="white-space:pre">        </span>&nbsp; &nbsp;&nbsp;<i><font color="#0042aa">class-clause</font></i> ... <font color="#a77b00">))</font></font></div><div><br></div><div><br></div><div>Now I need to be able to make a whole slew of my classes serializable. From Racket Reference, it looks like my only option is to use the "define-serializable-class*" syntax:</div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;"><div></div><div><br><br><table cellspacing="0" class="RktBlk RForeground" style="white-space: nowrap; text-align: left; position: relative; left: 0px; top: 0px; z-index: 1; color: rgb(0, 0, 0); background-color: rgb(232, 232, 255); "><tbody><tr style="white-space: inherit;"><td style="padding-left: 0px; padding-right: 0px; vertical-align: baseline; white-space: inherit;"><font face="Courier"><span class="RktPn" style="white-space: inherit; color: rgb(132, 60, 36); ">(</span><a name="(form._((lib._racket/private/class-internal..rkt)._define-serializable-class*))"></a><span title="Provided from: racket/class, racket"><span class="RktSym" style="white-space: inherit; color: rgb(38, 38, 128); "><a href="file:///Applications/Racket%20v5.3.4/doc/reference/objectserialize.html?q=serialize&amp;q=hash&amp;q=hash-set%21&amp;q=call-with-current-continuation&amp;q=hash&amp;q=sort&amp;q=member&amp;q=cond&amp;q=vector&amp;q=unimplemented&amp;q=vector&amp;q=-%3Em*&amp;q=class-c&amp;q=procedure&amp;q=object-name&amp;q=void&amp;q=exn%3Afail&amp;q=set-member%3F&amp;q=procedure-rename&amp;q=contract-out&amp;q=all-from-out&amp;q=struct&amp;q=contract-out&amp;q=sequence&amp;q=hash/c&amp;q=hash&amp;q=in-generator&amp;q=generator-%3Esequence&amp;q=let*&amp;q=ormap&amp;q=in-range&amp;q=for&amp;q=vector-%3Eimmutable-vector&amp;q=in-vector&amp;q=argmin&amp;q=vector&amp;q=for&amp;q=sequence&amp;q=augment-final&amp;q=set&amp;q=sequenceof&amp;q=send*&amp;q=foldl&amp;q=comprae&amp;q=class/c&amp;q=define-struct&amp;q=methods&amp;q=print&amp;q=integer-in&amp;q=substring&amp;q=string-%3Enumber&amp;q=range&amp;q=exn#%28form._%28%28lib._racket%2Fprivate%2Fclass-internal..rkt%29._define-serializable-class%2A%29%29" class="RktStxLink" data-pltdoc="x" style="text-decoration: initial; color: black;">define-serializable-class*</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar" style="white-space: inherit; color: rgb(38, 38, 128); font-style: italic; ">class-id</span><span class="hspace">&nbsp;</span><span class="RktVar" style="white-space: inherit; color: rgb(38, 38, 128); font-style: italic; ">superclass-expr</span></font></td></tr><tr style="white-space: inherit;"><td style="padding-left: 0px; padding-right: 0px; vertical-align: baseline; white-space: inherit;"><font face="Courier"><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn" style="white-space: inherit; color: rgb(132, 60, 36); ">(</span><span class="RktVar" style="white-space: inherit; color: rgb(38, 38, 128); font-style: italic; ">interface-expr</span><span class="hspace">&nbsp;</span><span class="RktMeta" style="white-space: inherit; ">...</span><span class="RktPn" style="white-space: inherit; color: rgb(132, 60, 36); ">)</span></font></td></tr><tr style="white-space: inherit;"><td style="padding-left: 0px; padding-right: 0px; vertical-align: baseline; white-space: inherit;"><font face="Courier"><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar" style="white-space: inherit; color: rgb(38, 38, 128); font-style: italic; ">class-clause</span><span class="hspace">&nbsp;</span><span class="RktMeta" style="white-space: inherit; ">...</span><span class="RktPn" style="white-space: inherit; color: rgb(132, 60, 36); ">)</span></font></td></tr></tbody></table></div></blockquote><div><div><br></div></div><div><br></div><div>I don't see how I can attach class contracts to my classes if I use this, but having class contracts is really import to me to catch bugs.</div><div><br></div><div>Can anyone tell me if there is a way to define serializable classes that still have contracts attached to them?</div><div><br></div><div>Thanks,</div><div><br></div><div>Christopher</div></body></html>