[CM] (sub)environments and object->string with :readable

Christos Vagias chris.actondev at gmail.com
Wed Jul 29 10:02:07 PDT 2020


Upon working with object->string with the :readable flag (in order to
save/load some state) I stumbled upon the following
(note that format "~W" is the same as (object->string obj :readable))


(define *subnamespace*
  (let ()

(with-let *subnamespace*
 (define nested-curlet
   (let ((nested 1))

(define top-curlet
  (let ((top 1))

(format *stderr* "top-curlet is ~W\n" top-curlet )
(with-let *subnamespace*
 (format *stderr* "nested-curlet is ~W\n" nested-curlet))

;; top-curlet is (inlet :top 1)
;; nested-curlet is (let ((<1> (inlet :nested 1)))
;;   (set! (outlet <1>) (inlet :nested-curlet <1>))   <1>)


Is this expected? (the nested-curlet printout)
I am using environments to create namespaces-like functionality. Is there a
way to print out the nested-curlet
as (inlet :nested 1)?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cm-mail.stanford.edu/pipermail/cmdist/attachments/20200729/cc2aefff/attachment.html>

More information about the Cmdist mailing list