[racket] Box: When and why?

From: Joe Marshall (jmarshall at alum.mit.edu)
Date: Fri Oct 22 14:13:00 EDT 2010

>> Racket is call-by-value. Period. Always. -- Matthias

On Thu, Oct 21, 2010 at 6:38 PM, Shriram Krishnamurthi <sk at cs.brown.edu> wrote:
> There is a variation on what Matthias said, which is when you need a
> shared structure whose value changes but whose representation may
> contain immutable constants.

I disagree.  `Call-by-value' is a statement about the way procedure
parameters (variables) are handled.  It is *not* a statement about
`values'.

Matthias is stating that if you have this code:
    (let ((a b))
      (F a b)
      (eq? a b))
then there is no procedure F that can make this fragment return false.
This has nothing to do with the any values that a and b may take on.

-- 
~jrm


Posted on the users mailing list.