[racket-dev] shared no longer works on cons?!?

From: Robby Findler (robby at eecs.northwestern.edu)
Date: Thu Oct 20 23:29:27 EDT 2011

On Thu, Oct 20, 2011 at 10:27 PM, Ryan Culpepper <ryan at cs.utah.edu> wrote:
> On 10/20/2011 09:14 PM, Shriram Krishnamurthi wrote:
>> Ryan, I noticed this seems to be a problem in full Racket as well: try
>> #lang racket
>> (define web-colors
>>  (shared ([W (cons "white" G)]
>>           [G (cons "grey" W)])
>>    W))
>> (rest web-colors)
>> Robby privately wrote to say it should be regarded as a bug.
> There seem to be conflicting intentions somewhere. Perhaps the racket/list
> checks were really intended to use proper-or-cyclic-list?... except that I
> think they were also put in place with the idea that list? was amortized
> constant time (cached in the pair header bits). I know Eli had to make the
> lazy version of first different for roughly the same reason, so maybe he can
> say whether this issue was considered for racket or the teaching languages.

Conflicting intentions aside, I think that this is a bug. At best, it
is a failure to document a change in the behavior, but I think it is
probably just a bug. (See the commit message)


Posted on the dev mailing list.