Andre van Tonder scripsit:

> Are you aware of any advantages in expressiveness of the two-pass
> that cannot be reproduced by rearrangement?  I vaguely remember
> that there may have been an example posted once to this list during
> R6RS, but I cannot remember it.

Well, I often insert executable subheaders like (display "Defining the
foo functions") into my source so I can watch the program load.  I #;
these out before deployment, of course.  This may be a trivial use,
but it's real.

Furthermore, it allows me to initialize a global data structure near
the code that manipulates it:

(define (make-foo ...) ...)
(define (foo add foo ...) ...)
;; define other foo stuff
(define the-master-foo (make-foo ...))
(foo-add the-master-foo 1 2 3)
(foo-add the-master-foo 4 5 6)
;; ...


-- 
John Cowan              http://www.ccil.org/~cowan      [email protected]
Would your name perchance be surname Puppet, given name Sock?
                --Rick Moen

_______________________________________________
r6rs-discuss mailing list
[email protected]
http://lists.r6rs.org/cgi-bin/mailman/listinfo/r6rs-discuss

Reply via email to