develooper Front page | perl.perl6.language | Postings from October 2001

TIMTOWT concat / idea: hypo-operators

From:
Edwin Steiner
Date:
October 6, 2001 07:01
Subject:
TIMTOWT concat / idea: hypo-operators
Message ID:
adz4na2d.fsf@gmx.net

Hello!

I have some questions about unary _

Is this going to concat $a,$b and $c?

	$foo = _($a,$b,$c);

(One way to save underlines and spaces if you have many operands.)

Or would that be:

	$foo = _@($a,$b,$c);

What will these do?

	$a _=_ ($b,$c);

	$a ^_= ($b,$c);

(WIM in Perl 5: $a .= $b.$c ?)



Could there also be *hypo*-operators, i.e. operators which try to
*lower* (reduce) the dimensionality of their operands to the lowest
common dim. So

	$foo = 5 +^ (1,2);

would set $foo to (5 + 1) + 2 and

	$foo = $a _^ ($b,$c);
	$a _=^ ($b,$c);

would do the same concats as above respectively?
Another application:

	$sum = 0 +^ @values;

Granted: ^ is not the best choice for a meta-operator which lowers
something. :)

Thanks for your time,

-Edwin




nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About