Question on pipes: I like very much the concept of relating them only
to the variadic list, that was the piece we were all missing in the P6L
discussions. After reading that appendix, I'm still a bit murky on the
final decisions as to which of these edge cases will be allowed:
my @out <== (1,2,3);
my @out <== (my @in = foo());
my @out <== foo();
(1,2,3) ==> my @out;
(my @in = foo()) ==> my @out;
foo() ==> my @out;
Are these all valid, or do some of them have to be errors? I got lost
in the appendix explanation of what was confirmed, and what was
wishful-only...
FWIW, stylistically, I'd personally vote for
@in ==> map {...}
==> sort {...}
==> map {...}
==> @out;
as better than:
@in ==>
map {...} ==>
sort {...} ==>
map {...} ==>
@out;
... if we care about such details. :-)
MikeL
> After reading that appendix, I'm still a bit murky on the
> final decisions as to which of these edge cases will be allowed:
>
> my @out <== (1,2,3);
> my @out <== (my @in = foo());
> my @out <== foo();
>
> (1,2,3) ==> my @out;
> (my @in = foo()) ==> my @out;
> foo() ==> my @out;
These are basically all just two edge-cases. Namely:
@var <== LIST
and:
LIST ==> @var
Larry is still leery, but I suspect they will ultimately be allowed.
Mainly because these:
@in ==> map {...}
==> sort {...}
==> map {...}
==> @out;
@out <== map {...}
<== sort {...}
<== map {...}
<== @in;
are much less annoying than:
@in ==> map {...}
==> sort {...}
==> map {...}
==> push @out;
push @out <== map {...}
<== sort {...}
<== map {...}
<== @in;
And because, as I demonstrated, the necessary overloaded multimethods are so
trivial to implement.
Damian
Have you considered:
LIST ==> @var.operator:=
LIST ==> @var.STOREARRAY
LIST ==> @var.how_do_i_spell_the_assignment_method
?
> Have you considered:
>
> LIST ==> @var.operator:=
> LIST ==> @var.STOREARRAY
> LIST ==> @var.how_do_i_spell_the_assignment_method
That's probably:
LIST ==> @var.STORE(*);
which is still pretty darn ugly. ;-)
Damian