[racket-dev] shared and names

From: Robby Findler (robby at eecs.northwestern.edu)
Date: Tue Oct 19 16:40:47 EDT 2010

I think that we'd have to add names to structs to do that. Seems
expensive. But maybe there is a better way?

Robby

On Tue, Oct 19, 2010 at 2:38 PM, Shriram Krishnamurthi <sk at cs.brown.edu> wrote:
> Is there any way for shared to check for whether a name was originally
> assigned to an LHS and, if so, to re-use it?  If I define
>
> (define cities (shared ([PVD (make-city ... (list BOS ORD))] [BOS ...]
> [ORD ...]) PVD))
>
> and it prints as
>
>
> (shared ((-0- (make-city "Providence" (list -3- -7-)))
>         (-11- (make-city "Boston" (list -3- -7- -16- -31-)))
>  ...
>
> it's really pretty hard to read!  (What's worse is that changes to the
> program change the assignment of -1-, -2-, etc., so even if I spent
> some time memorizing that -1- is PVD, -11- is ORD, etc., after I make
> a small change to my program, that memorized map is useless.)
>
> Shriram
> _________________________________________________
>  For list-related administrative tasks:
>  http://lists.racket-lang.org/listinfo/dev
>


Posted on the dev mailing list.