Food for thought...

Python:

one = 1,2,3
two = 4,5,6
both = one,two
first = both[0]
print(one)     # (1, 2, 3)
print(first)   # (1, 2, 3)

Python's `=` operator is like Raku's `:=`.

my @one := 1,2,3;
my @two := 4,5,6;
my @both := @one,@two;
my @first := @both[0];
say @one.raku;   # (1, 2, 3)
say @first.raku;  # (1, 2, 3)

Precisely the same result.

Assignment introduces mutability, is O(N) in both time
and space, and adds Scalars. Do you really need that
additional overhead for the sake of saving a character?

Binding maintains status quo on (im)mutability of values,
is O(1) in both time and space, and doesn't add Scalars.

I think binding will become increasingly used idiomatically
and it's a natural for your code, whether you use it for just
the one line or for all of them.

love, ralph

Reply via email to