On Thu, Mar 17, 2005 at 03:59:43PM -0800, Michael G Schwern wrote:
: What it doesn't solve is the $.method vs .method issue.  They look similar
: but one works on the invocant and one works on $_.  Still a trap.

Yes, and that's probably the killer of the "oc" idea.  So much for
Sleep Brain, heh, heh.  I think we'll need to figure out how to
shorten $_.foo instead.  Either that, or there has to be a way to
explicitly make $_ the invocant of a subblock.

At the moment I'm trying to see if I could get used to ..method meaning
$_.method, and whether it buys me anything psychologically.  Also, how
much of this could be solved with functions that merely default to $_
as in Perl 5?  Why do ".print" if we can say "print"?  (It's not a
rhetorical question, since, .print doesn't look for another argument
in the absence of parens, and print does, which could try to slurp
up a following block.  Suppose you are one of those rare people who
actually checks the return value of print to see if you filled up
the disk:

    if print {...}

That doesn't parse currently, because the print will treat {...}
as a closure argument and then there's no block for the "if".
(Backtracking the parser is probably not the right answer.)

Larry

Reply via email to