Larry's earlier response means this 'yours' idea is history, but for closure, yes, this seems to be headed in the right direction, at least in theory. It may have even been practical to implement it thru the standard property mechanism.
> so these two are equivalent ??? > > { > my $x is yours ; > my $y is yours ; > my $z is yours ; > ....1... > sub_a ; > ....2... > } > sub sub_a ( ; $x is yours, $y is yours ) { ...3... } ; > > ----------------------------- same as ------------- > # ( here no special meaning for "is yours" -- just another property ) > > { > my $x is yours ; > my $y is yours ; > my $z is yours ; > > ....1... > > #alias %MY to topic so that it can be fetched from sub_a by "is given" > $_ ::= \%MY ; > sub_a ; > > ....2... > > } > > sub sub_a ( ;$x is yours, > $y is yours ) is given($CALLER_SYMB) > { > #alias variables from $CALLER_SYMB to the local variables if > #requested > $SUB_SYMB ::= \%MY ; > for $SUB_SYMB.keys { > if $SUB_SYMB{$_}.yours > and $CALLER_SYMB{$_}.yours > { > $SUB_SYMB{$_} ::= $CALLER_SYMB{$_} ; > } > } ; > $CALLER_SYMB = undef ; #but better if this happens at compile time > # -- probably this have to be forced with > # BEGIN > ....3... > > } ; > > > > > arcadi -- ralph