News for hackers. Stuff that matters.
Re:Emacs Lisp Readable Closures (2013) by aidenn0 on Friday October 15, 2021 @12:12PM (#28879383)
How does this work if the closure will mutate a closed-over location? e.g.

  (let ((x 1))
   (funcall (read (prin1-to-string (lambda () (setf x 3)))))
   (print x))
[edit]

Realized I have Emacs installed and tried it; the above prints "1" while calling the lambda without first serializing causes the (print x) to print "3"

There are no comments on this comment yet.