[Parrot-users] Learning... how to avoid scalars in favor of arrays (maybe)
Jay Emerson
jayemerson at gmail.com
Thu Jul 7 02:51:24 UTC 2011
I modified the term:syn<integer_constant> method to be the following,
which (I think) then creates a trivial array of one element:
method term:sym<integer_constant>($/) {
my $past := PAST::Op.new( :name('!array'),
:pasttype('call'),
:node($/) );
$past.push($<integer>.ast);
make $past;
}
Perhaps this is one first step towards a language with no scalars?
Jay
--
John W. Emerson (Jay)
Associate Professor of Statistics
Department of Statistics
Yale University
http://www.stat.yale.edu/~jay
More information about the Parrot-users
mailing list