No! Please, God, no! I like perl, in no small part, because references are less confusing then pointers. Pointers, in no small part, are confusing because "*" means both "this is a pointer" (as in "int*"), and "give me the thingy at" (as in "chr=*str").Yes, * was originally a no-op in list context, but I think now we can use it to deref a list that would otherwise not interpolate itself. It maps better onto how a C programmer thinks, and if in scalar context it also happens to defer the signature checking to use the interpolated values, that's just an extra bonus.
It seems like this is creating the same confusion.
I hope that Perl will be intelegent enough to notice that the range is infinite, and say "attempt to flatten infinite list" rather then "ENOMEM" here.$foo = 0...; # take ref to an infinite range @bar = $foo; # puts in the iterator as a reference say @bar.elems; # prints 1 @bar = *$foo; # puts in 0... say @bar.elems; # prints Inf @bar = **$foo; # throws exception: "Please install a lot more memory"
Also, how does the use of *$foo differ from @$foo here? Is the later going away? (I'd think that horrible, for the same reason as above: C is confusing because it's not always clear what you get when you *.)
By the way, I like say, but wonder if we're going to become a horrible mix of APL and PHP. At least we don't have a Unicode alias for say (yet, why do I suspect we're about to get a unary » operator for it? Perhaps I'm just pessimistic this morning.)
-=- James Mastros