Re: [racket] confusion about shadowing predefined functions in interactions window

2012-10-23 Thread Dan Grossman
Thanks, these emails explain things fairly clearly. It's worth noting that as more functions get added to racket, it becomes more likely to trip across this. In particular, we hit this only because range was added between 5.2 and 5.3. --Dan On Tue, Oct 23, 2012 at 2:12 PM, Asumu Takikawa wrote

Re: [racket] confusion about shadowing predefined functions in interactions window

2012-10-23 Thread Asumu Takikawa
On 2012-10-23 08:48:35 -0700, Dan Grossman wrote: >Thanks, David.* I would be interested in someone walking through how this >behavior arises -- as well as the design issue regarding the "hopeless >top-level" A few months ago, I collected all of the instances of "the top-level is hopel

Re: [racket] confusion about shadowing predefined functions in interactions window

2012-10-23 Thread Dan Grossman
Yes, in my non-Racket-expert view, the core issue is certainly interactions between toplevel and the module system. It seems unfortunate at best that we have: Welcome to DrRacket, version 5.3 [3m]. Language: racket; memory limit: 512 MB. > (define (range lo hi) (print "hi") (if (> lo hi

Re: [racket] confusion about shadowing predefined functions in interactions window

2012-10-23 Thread Jens Axel Søgaard
I forgot to add one rationale for having a context dependent meaning of define-values. With the current setup, you can write (module foo some-lang (define (range ...) ...)) without worrying about whether range is defined in some-lang or not. -- Jens Axel Søgaard 2012/10/23 Jens Axel Søgaar

[racket] confusion about shadowing predefined functions in interactions window

2012-10-23 Thread Jens Axel Søgaard
2012/10/23 Dan Grossman : > > Thanks, David. I would be interested in someone walking through how this > behavior arises -- as well as the design issue regarding the "hopeless > top-level": Is this the least-bad option available or an unexpected > consequence? > > --Dan The expansion in the repl

Re: [racket] confusion about shadowing predefined functions in interactions window

2012-10-23 Thread Dan Grossman
Thanks, David. I would be interested in someone walking through how this behavior arises -- as well as the design issue regarding the "hopeless top-level": Is this the least-bad option available or an unexpected consequence? --Dan On Mon, Oct 22, 2012 at 7:30 PM, David Van Horn wrote: > On 10/2

Re: [racket] confusion about shadowing predefined functions in interactions window

2012-10-22 Thread David Van Horn
On 10/22/12 10:05 PM, Dan Grossman wrote: (define (range lo hi) (print "hi") (if (> lo hi) null (cons lo (range (+ 1 lo) hi ... I apologize if this is a known "feature" or a known "bug" -- I do scan the release notes briefly when new versions come out, but don't remember anything

[racket] confusion about shadowing predefined functions in interactions window

2012-10-22 Thread Dan Grossman
[DrRacket version 5.3, Language: racket] A colleague stumped me and I confirmed the behavior... * range is a provided procedure, but suppose we redefine it ourselves, in curried form: (define (range lo) (lambda (hi) (if (> lo hi) null (cons lo ((range (+ 1 lo)) hi) or (define ((range lo)