[racket-dev] shared and names

From: Shriram Krishnamurthi (sk at cs.brown.edu)
Date: Tue Oct 19 15:38:22 EDT 2010

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


Posted on the dev mailing list.