* Larry Wall [EMAIL PROTECTED] [2008-07-16 19:45]:
Speaking on behalf of the mere mortal, My Eyes Glaze Over.
Yeah, this proposal seems to be slipping into APL territory.
Regards,
--
Aristotle Pagaltzis // http://plasmasturm.org/
: and ** as repeated multiplication. Now imagine having a meta_postfix:*
: that gives +* as multiplication (perhaps abbreviated as *) and ** as
: (integer) exponentiation. We can then continue with replication as ~*
: for strings and ,* for lists thus freeing x and xx as some generic
: multiplication
Jon Lang wrote:
So you're suggesting that
A op* n
should map to
[op] A xx n
I don't think that that mapping works for Thomas' proposal of a
repetition count on post-increment operator. I.e.
$a ++* 3
is not the same as
[++] $a xx 3
(which I think is a syntax error)
and also
Dave Whipp wrote:
Jon Lang wrote:
So you're suggesting that
A op* n
should map to
[op] A xx n
I don't think that that mapping works for Thomas' proposal of a repetition
count on post-increment operator. I.e.
$a ++* 3
is not the same as
[++] $a xx 3
(which I think is a
Kealey, Martin, wrote:
Nice idea; introduces one particular ambiguity though: would
$m ** $n
then be
pow($m, $n)
or
pow($n, $m)
?
Neither. As with the reducing meta-operator, you would need to have
the ability to define an operator that takes precedence over a meta'd
operator,
HaloO,
I know that the hot phase of the operator discussions are over.
But here's a little orthogonalizing idea from my side. The observation
is that * can be regarded as repeated addition: 5 * 3 == 5 + 5 + 5
and ** as repeated multiplication. Now imagine having a meta_postfix:*
that gives
So you're suggesting that
A op* n
should map to
[op] A xx n
?
--
Jonathan Dataweaver Lang