On Mon, Apr 18, 2005 at 12:08:36AM -0400, Stevan Little wrote:
: These examples:
: 
:       pugs -e 'say shift [1, 2, 3].shift'
:       pugs -e 'say shift([1, 2, 3].shift)'
:       pugs -e 'say shift([1, 2, 3]).shift'
: 
: do not ever return, but yet does not seem to chew up the CPU either.

I don't see how those can be semantically valid, even if they parse.
I read them as shifting the return value of a shift, which would
be an attempt to shift on a scalar.

: Meanwhile, these examples:
: 
:       pugs -e 'say pop [1, 2, 3].pop'
:       pugs -e 'say pop([1, 2, 3].pop)'
:       pugs -e 'say pop([1, 2, 3]).pop'
: 
: all print '3'.

Same problem.  3.pop doesn't mean much.  All I can figure is that
it's following the list-in-scalar context rule to make [3].pop
out of it.

Larry

Reply via email to