Re: efficiency of let used in a binding

From: Brian Denheyer <>
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.


> 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
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