Hacker News new | ask | show | jobs
by yxhuvud 27 days ago
The parallel assignment just work mostly like it does in ruby so that doesn't look weird to me (except the need for 'var' in the first place).

Agreed on the rest, though I don't understand what the problem would be with recursion. Is it using reference passing also for primitives like integers?

2 comments

> Is it using reference passing also for primitives like integers?

That's what I assumed, but honestly I might have misunderstood the docs. This passage is not very clear:

> Copper manipulates only references to objects. Simple data types such as integers must be seen as references to stateless objects (i.e. objects that have no state in memory).

Sounds like they store the integer in the reference itself in that case. Which also is how Ruby does things (though Ruby has to decide what is what at runtime and thus steal a couple of bits off every integer).
Python does that too
Is this not destructuring a tuple?