Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Allow redefinition of initial bindings for R5RS without using DrRacket

Tags:

racket

For the R5RS language, DrRacket has the option to turn Disallow redefinition of initial bindings on or off.

This made me curious: Is it possible to adjust language settings like this without using DrRacket? (e.g., when using Racket from the command line, or Emacs)

If so, in which ways? If not, or not in a reasonable manner, why?

like image 985
bitrauser Avatar asked Oct 27 '25 17:10

bitrauser


1 Answers

The parameter compile-enforce-module-constants controls whether redefinitions are allowed:

soegaard$ ./racket 
Welcome to Racket v6.6.0.3.
-> (compile-enforce-module-constants #f)
-> (module test r5rs (define + -) (display (+ 43 1)) (newline))
-> (require 'test)
42

See more here: http://docs.racket-lang.org/guide/module-set.html

like image 113
soegaard Avatar answered Oct 29 '25 17:10

soegaard



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!