Damian Conway wrote:
Rod Adams wrote:
I also find the following incredibly disturbing:
>perl6 -e "$x = 'cat'|'dog'; say $x;" dog cat
That would be disturbing if that's what happened.
C<say @what> is just a shorthand for C<print @what, "\n">.
So saying a junction is the same as printing it, which is a run-time error.
So we have a restriction that Junctions cannot be outputted. What qualifies as output? Clearly C<print> and its derivatives are output. What about a DBI call? Hmm. I guess it does ultimately resolve into a socket write, so it would be trapped there.
However, what if what you're calling a non-Perl Parrot based function? Do we disable junctions from playing with non-PurePerl functions? Or do we autothread over them? How do we tell if a non-Perl function outputs to determine if we should be able to autothread into them or not?
Out of curiosity, was the "Junctions can't be outputted" error documented somewhere prior to now?
-- Rod Adams