Arc Forumnew | comments | leaders | submitlogin
1 point by shader 5560 days ago | link | parent

Supposing you knew that a function was a closure, couldn't you print it out as

  (= fname
    (with (var1 val1 var2 val2 ...)
      (fn (arg1 arg2)
         ...)))
When read in, it should produce an identical closure. The problem is knowing under what variables the function is closed in the first place.

It would be nice if there was more information about objects and source code in arc. I.e. the source codes of functions, the current namespace, the variables captured in a closure, the stack trace, etc.