Blake,<br><br>
<div class="gmail_quote">On Tue, Feb 9, 2010 at 7:15 PM, Blake McBride <span dir="ltr"><<a href="mailto:blake@mcbride.name">blake@mcbride.name</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div><br></div>
<div>BTW, I've now got a Lisp macro that maps all the methods in a Java class into a corresponding CLOS class.</div>
<div> </div></blockquote>
<div> </div>
<div>This is pretty neat. Yes there is no reason that CLOS or at least very usefull form of a object system that reuses existing java class should not be defined by macros to make it smooth</div>
<div> </div>
<div>I used to imagine that the runtime-class.lisp was piso's original plan (generated java classes from lisp .. which these objects could be mixins subclasing pre-exisitng java classes)</div>
<div>In my ABCL Clojure extension <a href="http://code.google.com/p/opensim4opencog/source/browse/trunk/bin/cl-cogbot.lisp?r=46">http://code.google.com/p/opensim4opencog/source/browse/trunk/bin/cl-cogbot.lisp?r=46</a>, (this file is simplistic becasue some code is i the non-lisp sources) but you get the gist.</div>
<div> </div>
<div>I preroll existing C#/.NET class into a set of existing methods gleaned from java's reflection using a name-mangling contract (as-needed). </div>
<div>In cases I have multple possible methods per class (or interface).. i end up doing a (defun someclass-somemethod (self &rest args) (... guess the right jcall ....))</div>
<div> </div>
<div>Static class fields, like String.CASE_INSENSITIVE_ORDER i make a symbol macro on %JAVA-LANG-STRING/CASE-INSENSITIVE-ORDER</div>
<div> </div>
<div>But my blindspot still is on how to please a more CLOSy clonsuming codebase so I am very interested in seeing how you set things up from your macros.</div>
<div> </div>
<div> </div></div>