[racket] DrRacket and Modules
Correct.
Thanks.
Jos
-----Original Message-----
From: Vincent St-Amour [mailto:stamourv at ccs.neu.edu]
Sent: lunes, 15 de agosto de 2011 15:32
To: Jos Koot
Cc: 'Harry Spier'; users at racket-lang.org
Subject: Re: [racket] DrRacket and Modules
At Mon, 15 Aug 2011 10:56:52 +0200,
Jos Koot wrote:
> About (define cons 1). Originally this was not permitted. On my request
this
> was permitted more than a year ago. The remark in the guide must be a left
> over of old times. The reason I asked for this change is the following:
> suppose you have a module that imports racket and defines a variable
> some-name. Now if racket is extended to export a variable of the same
name,
> your module would no longer work. It is a matter of scope. It remains
> prohibited to import the same variable from two different modules.
You can shadow bindings that you get from your language, but not those
that you get from your requires. For example, this works:
#lang racket
(define cons 1)
But this doesn't:
#lang racket
(require racket)
(define cons 1)
If `racket' starts exporting bindings whose names clash with yours,
you're still fine if you use `#lang racket', but not if you use
`(require racket)'.
Vincent