Arc Forumnew | comments | leaders | submitlogin
1 point by almkglor 6031 days ago | link | parent

> I'm missing something in your comment about tagged types - is rainbow doing it wrong? Arc internally uses a vector to represent tagged types afaik, but rainbow uses a custom "Tagged" class. The example you give behaves in the same way in rainbow.

No, I just got confused with the lack of 'rep in the call* test ^^ Sorry!

(thing!method arg1 argn) feels more natural to me, but I don't have any idea of any potential mismatch in the way java and arc works.



2 points by conanite 6031 days ago | link

oops, no, I'm sorry. I didn't see what you were missing. The test is set up at the start of the test file, with

  (sref call* (fn (the-bobo size) (* the-bobo size)) 'bobo)
So

  (* b 3)
works where b is a 'bobo.

As for

  (thing!method arg1 argn)
it's true, when you write it that way, it feels more natural. At a first glance though, this means (thing 'method) must return a method-invoker, which then gets invoked with zero or more arguments. It seems like this would add complexity - instead of calling the method, we call to get the invoker and then call it. The question, as always, is whether the increase in readability merits the increase in complexity ... we'll see what happens I suppose.

-----