On Thu Feb 19 12:03:03 2009, ml...@physik.uni-wuerzburg.de wrote:
> Rakudo 00e9db:
> 
> .say for (1, 2, 3).item
> 
> prints three lines, although it should be just one (same as for [1, 2,
> 3]), see http://irclog.perlgeek.de/perl6/2009-02-19#i_924753 and below.
> 
> There's a test for that in t/spec/S02-builtin_data_types/array.t now.

...not so fast, there's more!  :-)

20:02 <pmichaud> with   .say for (1,2,3).item
20:03 <pmichaud> why would that not be   1\n2\n3\n ?
20:03 <moritz_> because it's one item over which for iterate
20:03 <TimToady> (1,2,3).item should be equiv to [1,2,3]
20:03 <moritz_> *iterates
20:03 <pmichaud> yes, but how does that differ from   .say for @a   ?
20:04 <TimToady> @a interpolates, [] doesn't; I guess I think of it as
[] since it's anonymous
20:04 <pmichaud> I know that @a interpolations and [] doesn't, but what
distinguishes the two internally?
20:04 <pmichaud> *interpolates
20:05 <TimToady> I suppose [] is really Scalar of Array
20:05 <pmichaud> right
20:05 <pmichaud> that's what Rakudo currently does
20:05 <pmichaud> so does this mean that .item also implies Scalar of ... ?
20:06 <pmichaud> i.e., so that  (1,2,3).item would return a reference as
opposed to just an Array ?
20:06 <TimToady> lemme think about that

Reply via email to