[plt-scheme] why local? (just curious)

From: Sigrid Keydana (keydana at gmx.de)
Date: Thu Jan 15 04:30:46 EST 2009

Hi,

sorry for writing such an unimportant question (please ignore it if it's
too unimportant ), but I'm just curious about something:
I remember having seen the "local" form in HDTP, but I'd thought it was
for learning purposes only. Now I see it's used in the Continue Guide
I'm working through and it's part of standard (PLT) scheme. I just
wonder why it's necessary (or even "nice-to-have") - why not simply use
let or letrec?

For example, in the Continue guide, wouldn't it be much easier just to
use let:

(define (start request)
    (local ((define a-blog
              (cond ((can-parse-post? (request-bindings request)) (cons
(parse-post (request-bindings request)) BLOG))
                    (else BLOG))))
      (render-blog-page a-blog request)))


Thanks in advance,
Sigrid




Posted on the users mailing list.