HaloO,

Moritz Lenz wrote:
The counter example is if you want to print a pair:

.say for %hash.pairs.sort: { .value };

In that case it would be nice to have the key appear in the stringification.

I see no problem as long as say gets a pair as argument. Then it can
print the key and value separated with a tab. More problematic are
string concatenations of the form

   say "the pair is: " ~ (foo => $bar);

which need to be written so that say sees the pair

   say "the pair is: ", (foo => $bar);

and not a string that only contains the value of the pair. I'm not
sure if the parens are necessary to pass the pair to say as argument
to be printed instead of a named argument that influences how the
printing is done.


Regards, TSa.
--

"The unavoidable price of reliability is simplicity" -- C.A.R. Hoare
"Simplicity does not precede complexity, but follows it." -- A.J. Perlis
1 + 2 + 3 + 4 + ... = -1/12  -- Srinivasa Ramanujan

Reply via email to