[racket] to local or not to local

From: Matthias Felleisen (matthias at ccs.neu.edu)
Date: Mon Jan 3 11:33:19 EST 2011

On Jan 3, 2011, at 11:31 AM, Stefan Schmiedl wrote:

> Hi.
> 
> In the web-server related documentation, I see the preferred way to
> create local procedures as
> 
>  (define (start request)
>    (local ((define (response-generator...))
>            (define (some-handler...)))
>      (do-something-with-these)))
> 
> Another way to create local procedures is
> 
>  (define (start request)
>    (define (response-generator...))
>    (define (some-handler...))
>    (do-something-with-these)))
> 
> Is there some (subtle?) difference between these approaches?
> Which way is appropriate in what conditions?


There is. An experienced programmer (*) should go with the second form. 

(*) someone who can handle error messages and subtle changes to them. 


Posted on the users mailing list.