I tried the following programs in DrRacket  5.2

;--- start
#lang racket/base
(define + -)
(+ 7 2)
;--- end
Result:
5
;---


;--- start
#lang racket/base
(require (only-in racket/base +))
(define + -)
(+ 7 2)
;--- end
Result:
[error] module: identifier is already imported in: +
;---


In the first example the function + is redefined. I expected to get an
error in both programs. I’m not sure if this is a bug or a feature.

(And I couldn’t find in the documentation which is the expected behavior.)

Gustavo

____________________
  Racket Users list:
  http://lists.racket-lang.org/users

Reply via email to