mix java and sisc generics (REPOST CORRECTED)

"Scott G. Miller" <[email protected]> Tue, 16 Oct 2007 09:27:06 -0500
Newsgroups gmane.comp.java.sisc.user
Message-ID <[email protected]>
On 10/16/07, Mike J. Bell <[email protected]> wrote:
> Sorry, GMail barfed on my last post.  Here's what I meant to send in its
> entirety:
>
> Quick question...I want to mix java and sisc generic procedures to reduce
> the amount of java type conversions I do.  For instance:

..snip..

Unfortunately, the define's both define a new binding, so you're
overwriting the Java one with the Scheme one.  What you probably want
to do is define the Java one with a different name, and call that from
your Scheme generic.  eg:

(define-generic-java-method (jdebug |debug|))

And then call jdebug from your Scheme code.  You don't need to use
Scheme generics to do this, either, though you certainly can:

(define (debug log string)
  (jdebug log (->jstring string))


   Scott

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/