Re: efficiency of let used in a binding

From: Brian Denheyer <briand_at_soggy.aqua.com>
Date: Mon, 20 Oct 1997 21:15:28 -0700 (PDT)

Lars Thomas Hansen writes:

> short-lived objects cheap. Writing a generational collector for STk is
> left as an exercise for the reader.

ROTFL

>
> In the given situation, rewriting the program as
>
> (define (mouse-motion x y)
> (set! new-x (transform x))
> (set! new-y (transform y))
> ...)
>

Dumb question, but, I assume I want new-x and new-y to be globals ?

Also - the other solution is - if the routine is living inside another, i.e.

(define foo
...
(define (mouse-motion
...

Then I should be able to declare variables inside foo, and then use
set!. This solves the name-space problem and the allocation problem
at the same time, does it not ??

-- 
Brian Denheyer
briand_at_northwest.com
Received on Tue Oct 21 1997 - 05:13:51 CEST

This archive was generated by hypermail 2.3.0 : Mon Jul 21 2014 - 19:38:59 CEST