Arc Forumnew | comments | leaders | submitlogin
Revisiting arc's gensyms (github.com)
3 points by eds 5744 days ago | 2 comments


2 points by eds 5744 days ago | link

I recently found a partial attempt to fix arc's gensyms on Anarki. I say partial because although 'uniq now returns uninterned symbols, 'ac-global-name still automatically interns them (in order to add "__" to the front) when they are evaluated. Thus name capture is still possible:

  arc> (w/uniq g
         (prn g)
         (eval `(= ,g 5))
         (prn (eval g))
         (= g1802 6)
         (prn (eval g)))
  g1802
  5
  6
  6
I believe the appropriate fix is to keep 'ac-global-name from automatically interning gensyms. I posted one possible (though ugly) solution at http://arclanguage.org/item?id=5104, but didn't commit the change because people didn't seem terribly enthusiastic at the time. Considering that someone else seems to be concerned with Arc's gensyms, I may commit a fix if I have time.

-----

2 points by eds 5744 days ago | link

Done.

http://github.com/nex3/arc/commit/d2eb6dde7811f33035acc44eca...

  arc> (w/uniq g
         (prn g)
         (eval `(= ,g 5))
         (prn (eval g))
         (= g1802 6)
         (prn (eval g)))
  g1802
  5
  5
  5
  arc> g1802
  6

-----