[racket] to local or not to local
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.