On Wed, Nov 26, 2008 at 08:54:50AM +0100, Moritz Lenz wrote:
:
:
: Patrick R. Michaud wrote:
: > Currently Rakudo is treating [EMAIL PROTECTED] as though it's
: > prefix:<^> on a List, which S03 says
: >
: > If [prefix:<^> is] applied to a list, it generates a
: > multidimensional set of subscripts.
: >
: > for ^(3,3) { ... } # (0,0)(0,1)(0,2)(1,0)(1,1)(1,2)(2,0)(2,1)(2,2)
: >
: > So, Rakudo is currently seeing [EMAIL PROTECTED] as following this
definition,
: > and trying to generate the subscripts (perhaps wrongly).
:
: Yes, wrongly:
: 08:48 < moritz_> rakudo: say (^(3,3)).perl
: 08:48 < p6eval> rakudo 33212: OUTPUT[[0, 1, 2, 0, 1, 2]]
: 08:51 < moritz_> rakudo: say (^(10,3)).perl
: 08:51 < p6eval> rakudo 33212: OUTPUT[[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0,
: 1, 2]]
:
: It counts up first the first index, then the second.
:
:
: I see how the specced makes sense for a List of Ints, but not for any
: other list - any ideas from the design team?
My guess is that the list overloading will simply vanish into thin air,
and you'll have to say something like
^«(3,3)
to get the current Parrot meaning, and
[X] ^«(3,3)
or
^3 X ^3
to get the specced list meaning. But other viewpoints are welcome...
Larry