[plt-scheme] Re: SLIB3a4 and DrScheme 360

From: Kyle Smith (airfoil at bellsouth.net)
Date: Tue Dec 5 14:38:48 EST 2006

John T. Murphy <jtm at ...> writes:

> call-with-input-string differs in the two files slibinit/init.ss and
> DrScheme.init:
> 
> >From slibinit/init.ss:
> (define call-with-input-string
>   (lambda (string thunk)
>     (parameterize ((current-input-port (open-input-string string)))
>       (thunk))))
> 
> >From DrScheme.init:
> (define call-with-input-string 
>   (lambda (string thunk)
>     (parameterize ((current-input-port (open-input-string string)))
>       (thunk (current-input-port)))))

Commenting on this last bit of code only:

What's odd is that in DrScheme.init they've gone to the trouble of 
parameterizing the current-input-port to an input-string-port, and
then pass a 'thunk' (current-input-port).  Thunks don't take
arguments, so this would appear on face value to be a bug, but maybe
someone with more experience can make sense of it.  I can't.

--kyle

Kyle Smith
airfoil at bellsouth dot net
schemekeys.blogspot.com



Posted on the users mailing list.