[plt-scheme] Noticeable absence of (with-output-to-port ...)and(with-input-from-port ...)

From: Jos Koot (jos.koot at telefonica.net)
Date: Thu Sep 11 14:00:57 EDT 2008

Well a procedure is to be preferred, I think:

(define (with-output-to-port port thunk)
 (parameterize etc)
Jos

----- Original Message ----- 
From: "Jos Koot" <jos.koot at telefonica.net>
To: "Robby Findler" <robby at cs.uchicago.edu>; "Ernie Smith" 
<esmith at acanac.net>
Cc: "PLT Scheme List" <plt-scheme at list.cs.brown.edu>
Sent: Thursday, September 11, 2008 7:55 PM
Subject: Re: [plt-scheme] Noticeable absence of (with-output-to-port 
...)and(with-input-from-port ...)


> The absence of with-output-to-port has no deep foundation. It can easily 
> be made by yourself:
>
> (define-syntax with-output-to-port
> (syntax-rules ()
>  ((_ port thunk)
>   (parameterize ((current-output-port port)) (thunk)))))
>



Posted on the users mailing list.