Subject: Re: Internal defines (was Re: How to do this in Scheme (elegantly)?)
From: rpw3@rigden.engr.sgi.com (Rob Warnock)
Date: 1996/10/12
Newsgroups: comp.lang.scheme
Message-ID: <53ngu2$7nb@tokyo.engr.sgi.com>

Guillermo (Bill) J. Rozas <gjr@hpl.hp.com> wrote:
+---------------
| There are several advantages that internal DEFINE has over LETREC.
| 3. It allows you to take code that you've been playing around with
|    (i.e. debugging) at "a top level" and, _without reformatting it_,
|    hide it inside the routine that needs it.  I do this all the time.
|    Having to reformat it as a LETREC would be painful...
+---------------

Given that I learned a lot of the Scheme I know from SAP, I actually
do exactly the *opposite* of this! ;-}  ;-}  I write all my top-level
routines as (define foo (lambda ...)), which makes it trivial to drop
them into LETRECs later [which is why I thought SAP did it that way, in
fact] or even cut-n-paste just the lambda into some anonymous expression,
if you need to.

But as far as I can tell, either top-level style works fine, as long
as you do it consistently...


-Rob

-----
Rob Warnock, 7L-551		rpw3@sgi.com
Silicon Graphics, Inc.		http://reality.sgi.com/rpw3/
2011 N. Shoreline Blvd.		Phone: 415-933-1673  FAX: 415-933-0979
Mountain View, CA  94043	PP-ASEL-IA