----- Original Message ----- From: Luke Palmer <[EMAIL PROTECTED]> Date: Tuesday, June 29, 2004 6:13 am Subject: Re: A stack for Perl?
> > 1; > > $_='foo bar baz'; > > split; > > # @STACK now is (1, 'foo', 'bar', 'baz'); > > > To boot, I can't think of a way to implement that in currently-defined > Perl 6, which should scare you. I think it could be implemented by proxying the base Perl PMCs (or, alternatively, tying each class for each of the base types, or whatever). Then, in each FETCH equivalant, wanted() could be checked to see if the FETCHish call was made in void context. If so, the object could push itself onto @*STACK. So, I think it could be implemented in a module, which is probably a good thing, because seeing something like this in standard code would just be annoying. (Although, now that I think about it, @*STACK seems to just be the inverse of $_/@_/%_, so maybe @*STACK should be named @¯ :)