[plt-scheme] Efficiency and automatic conversions
When you talk to other languages and have no compile-time type
information, how do you get rid of the following pyint->integer
without a big slow cond in the proxy class's generated methods?
(require (lib "class.ss")
"convert.ss"
"python.ss")
(py-eval "
class myclass(object):
def m(self, x):
return x
")
(define py-myclass (in-python (ns-get 'myclass)))
(define myclass% (wrap-pyclass py-myclass))
(define obj (make-object myclass%))
(printf "obj.m(2) = ~a~n"
(pyint->integer (send obj m 2)))
Daniel