shadows of define and define-syntax 
Author Message
 shadows of define and define-syntax

When a variable is defined twice, the second definition is just an
assignment.

A syntax-definition can hide the variable definition.  A variable
definition can hide a syntax definition.

What should happen when between two variable definitions there is a
syntax-definition - are the two variables distinct or does the second
definition make the first binding visible again?

Example: should this fragment (display 'this) or (display 'that)?

(define answer (lambda () (frobnicate '(this . that))))

(define frobnicate car)

(define-syntax frobnicate <whatever>)

(define frobnicate cdr)

(display (answer))

I hope it is this.

--
Jussi



Wed, 03 Jul 1996 18:01:20 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. is define-syntax inside define-syntax OK?

2. define in define-syntax

3. define-macro -> define-syntax

4. define-macro vs define-syntax

5. Macros defining macros with define-syntax

6. define-syntax must be followed by syntax-rules ??

7. unusual define-syntax syntax

8. Can TPB be defined outside defining modules?

9. Define in a define

10. Defining define (possibly a mad question)

11. Scheme macro source: define/keyed, for defining keyword-triggered arguments

12. Simple persistent object storage: seeking advice on storing user defined, runtime defined abstract datatypes into Oracle

 

 
Powered by phpBB® Forum Software