[plt-scheme] Efficiency and automatic conversions

From: Matthias Felleisen (matthias at ccs.neu.edu)
Date: Fri Nov 26 10:35:19 EST 2004

Static analysis. And that's as large as the rest of the project 
together.

On Nov 26, 2004, at 4:41 AM, Daniel Silva wrote:

>   For list-related administrative tasks:
>   http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>
> 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



Posted on the users mailing list.