Remix.run Logo
▲ yxhuvud 21 hours 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?

▲teo_zero 19 hours ago | parent | next [-]

> 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).

▲yxhuvud 18 hours ago | parent [-]

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).

▲Muhammad523 15 hours ago | parent | prev [-]

Python does that too

▲antihero 13 hours ago | parent [-]

Is this not destructuring a tuple?