[plt-scheme] Volunteers: help with Moby!

From: Sigrid Keydana (keydana at gmx.de)
Date: Fri Jan 16 11:40:13 EST 2009

Thanks
Then I am asking these precise questions now :-)

ciao,
Sigrid



Matthias Felleisen schrieb:
>
> On Jan 16, 2009, at 9:32 AM, Sigrid Keydana wrote:
>
>> (program->java-string '(+ 2 3))
>
>
> in drscheme's teaching languages has the following meaning:
>
>   add the rational 2 to the rational 3
>
>
>> in drscheme, and the output
>>
>> "static { org.plt.Kernel.identity(org.plt.Kernel._plus_); }\nstatic {
>> org.plt.Kernel.identity((new org.plt.types.Rational(2, 1))); }\nstatic {
>> org.plt.Kernel.identity((new org.plt.types.Rational(3, 1))); }\n"
>
> Now read this as a sequence of static blocks to be added to a class's
> static init protocol:
>
>  new org.plt.types.Rational(2, 1) // makes the rational # 2 (rationals
> are two integers)
>  new org.plt.types.Rational(3, 1) // 3
>  org.plt.Kernel._plus_  // a command for adding
>
> Now you can ask the precise questions:
>
>  -- what are the identity methods doing here
>  -- how do the numeric constants and the plus operation get hooked up.
>
>



Posted on the users mailing list.