Ingo Blechschmidt asked:

    my $pair = (a => 42);
    say ~$pair;  # "a\t42"? "a\t42\n"? "a 42"?


Not yet specified but I believe it should be "42" (i.e. stringifies to value).

Note that S02 does specify that pairs *interpolate* to key-tab-val-newline,
so you can still get "a\t42\n" by writing "$pair" instead.


    say +$pair;  # 0 (pairs aren't numbers)?
                 # 42?
                 # 0 ("a" is not a number)?
>                  # 0 (~$pair can't be used as a number)?

Not yet specified, but I believe it should be 42 (i.e. numerifies to the value)


    say ?$pair;  # true (because 42 is true)?
                 # true (because pairs are always true)?

Not yet specified but I believe it should be true because 42 is true

In summary: when applied to a pair, the value-coercing operators should coerce the pair's value.

Damian

Reply via email to