Re: [racket] hash-ref

2010-07-18 Thread Robby Findler
> > > From: Neil Van Dyke [mailto:n...@neilvandyke.org] > Sent: 19 July 2010 00:22 > To: Jos Koot > Cc: 'plt-scheme' > Subject: Re: [racket] hash-ref > > Jos Koot wrote at 07/18/2010 09:26 AM: > > (hash-ref a-hash a-ke

Re: [racket] hash-ref

2010-07-18 Thread Jos Koot
loop ((...)) ... (hash-ref! hash key default) ...) I am pretty sure that in this case the identity function is constructed once only. Jos _ From: Neil Van Dyke [mailto:n...@neilvandyke.org] Sent: 19 July 2010 00:22 To: Jos Koot Cc: 'plt-scheme' Subject: Re: [racket] hash-ref Jos K

Re: [racket] hash-ref

2010-07-18 Thread Neil Van Dyke
Jos Koot wrote at 07/18/2010 09:26 AM: (hash-ref a-hash a-key a-value) In the past a-value was required to be a procedure. Now it can be anything. [...] In short, I do not well understand the reason to relax the contract of hash-ref and hash-ref!. This behavior seems a little on the uncomfo

Re: [racket] hash-ref

2010-07-18 Thread Jos Koot
Robby and Matthew, Thanks, I understand, I think. Jos _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/users

Re: [racket] hash-ref

2010-07-18 Thread Matthew Flatt
At Sun, 18 Jul 2010 22:55:44 +0200, "Jos Koot" wrote: > Now consider: > > (let ((var ...)) > ... > (hash-ref hash key (lambda () var)) > > Do I understand well that this thunk is not cq cannot be compiled to a > constant? Correct. > When compiling the thunk, the location of var relative to th

Re: [racket] hash-ref

2010-07-18 Thread Robby Findler
ack is known, is it not? > Thanks, > Jos > >> -Original Message- >> From: Matthew Flatt [mailto:mfl...@cs.utah.edu] >> Sent: 18 July 2010 22:43 >> To: Jos Koot >> Cc: 'Robby Findler'; 'plt-scheme' >> Subject: Re: [racket] hash-ref >&g

Re: [racket] hash-ref

2010-07-18 Thread Jos Koot
age- > From: Matthew Flatt [mailto:mfl...@cs.utah.edu] > Sent: 18 July 2010 22:43 > To: Jos Koot > Cc: 'Robby Findler'; 'plt-scheme' > Subject: Re: [racket] hash-ref > > Actually, you're right. A `lambda' form like > > (lambda () #f) >

Re: [racket] hash-ref

2010-07-18 Thread Matthew Flatt
om] On Behalf Of Robby Findler > > Sent: 18 July 2010 15:39 > > To: Jos Koot > > Cc: plt-scheme > > Subject: Re: [racket] hash-ref > > > > It is for performance reasons. Specifically you can avoid > > creating the procedure ove

Re: [racket] hash-ref

2010-07-18 Thread Jos Koot
Of Robby Findler > Sent: 18 July 2010 15:39 > To: Jos Koot > Cc: plt-scheme > Subject: Re: [racket] hash-ref > > It is for performance reasons. Specifically you can avoid > creating the procedure over and over (if you're calling > hash-ref over and over). > > R

Re: [racket] hash-ref

2010-07-18 Thread Robby Findler
It is for performance reasons. Specifically you can avoid creating the procedure over and over (if you're calling hash-ref over and over). Robby On Sunday, July 18, 2010, Jos Koot wrote: > > > > > > (hash-ref > a-hash a-key a-value) > In the past > a-value was required to be a procedure. > Now i