Arc Forumnew | comments | leaders | submitlogin
1 point by sacado 4144 days ago | link | parent

Yep, I did not try to handle sharedvars at all with my GC. I will eventuelly need to give them a type tag, but I deferred that to the next release :) Splitting polymorphic functions is something that has to be done too.

As for variadic +, I don't know : if we transform (+ a b c d) in (+ a (+ b (+ c d))) during the first phase of compilation, we obviously handle variadic +, but at the end (in the generated code), the ADD() primitives only handles + with 2 args, which I guess would be more efficient ? And, that way, we could translate (+ a 1 b 2) into (+ a (+ 3 b)), and (+) to 0, which will eventually have to be done.

3 points by almkglor 4144 days ago | link

Then someone redefines '+ so that it doesn't just add numbers or concatenate strings. Say (+ 1 2 "asdf") becomes "3asdf".

Further, what if we need to pass '+ as a function to another function?

  (def hmm (op)
    (op 1 2 3 4 5))


1 point by sacado 4143 days ago | link

Oh, yes, so that wasn't really a good idea...