[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Internal Definitions

This page is part of the web mail archives of SRFI 93 from before July 7th, 2015. The new archives for SRFI 93 contain all messages, not just those from before July 7th, 2015.

I think the right way to handle internal definitions is that a
definition effects the entire lexical scope, but it does not take
effect until evaluated. Here is an example:

(define x 0)

(define (f)
 (set! x 1))

(define (g)
 (set! x 3))

(define-syntax foo
 (syntax-rules ()
    (begin (define (pr) (write x))
           (define x 2)
           (define x 4)

(foo) (write x) (newline)

should write: 012243

With this there is no early scanning of left hand sides and no
restrictions on the placement of definitions or syntax