Arc Forumnew | comments | leaders | submitlogin
2 points by tung 6092 days ago | link | parent

The arc implementation doubles as the specification. Piggy-backing on mzscheme's gensyms seems like an attractive prospect at first, until you realise that we now have a part of arc which isn't defined in arc. The only way that could work is if gensym becomes considered as a language axiom, and I'm not sure if it's really a candidate for that.

In practice, I wouldn't believe to be that much of a problem. Who would want to mimic the abominable symbols generated by arc with the current methods anyway, intentionally or otherwise?



1 point by eds 6092 days ago | link

You have a good point there. Fortunately it can be fixed trivially, by returning the definition of 'ar-gensym to its original form and using 'string->uninterned-symbol instead of 'string->symbol. (I suspect this is what mzscheme 'gensym does anyways.)

  (define (ar-gensym)
    (set! ar-gensym-count (+ ar-gensym-count 1))
    (string->uninterned-symbol (string-append "gs" (number->string ar-gensym-count))))

-----