Arc Forumnew | comments | leaders | submitlogin
4 points by suzuki 3843 days ago | link | parent

No, I have not played the original Arc yet and had hardly known both implementations in Java until recently. My version 1 implementation was a little Lisp written in ISO Standard Pascal:

  Little Lambda Lisp in Standard Pascal
You find the notable(?) feature of Semi-Arc, macro expansion without free symbol capture, even in the version 2 of it:

  Little Lambda Lisp 2 in Standard Pascal
I had translated it to Ruby, Python, C# and Java. Recently I noticed that its design is near to the core of Arc. I made it up so that it may look Arc:-). The result is Semi-Arc.

As for argument destructuring, I implemented it in a simple, general and recursive (but not so efficient) way. Track the variable 'nestedArgs' in the method 'compile(Cell j, Cell env)' in the source:
Also, you can inspect the implementation interactively:

  arc> (def f ((a b)) (+ a b))
  arc> (inspect f)
  (#<fn> ((1)) (apply (#<fn> ((2) #<none>) (+ #0:0:a #0:1:b)) #0:0:$G453))