On Tue, Jul 20, 2004 at 08:35:10PM -0600, Luke Palmer wrote:
: This doesn't quite feel right to me. I was really a big fan of the good
: ol' Perl 6 days where you could interpolate as in Perl 5, and method
: calls required parentheses. I understand why Larry wanted to take out
: the parentheses, though... or rather why I'd want to take out the
: parentheses if I were him. It's so that people would stop thinking of
:
: $foo.bar
:
: as a method call, and more as an attribute. Or just more abstractly --
: less procedurally -- in general. This I'm all for.
:
: But then making them interpolate without parens get's a little to
: "loose" for my tastes. Perl's then come to the point of doing too much
: for me, and I want it to just sit down and shut up.
By analogy, we could add a row:
Interpolates
No Yes
-- ---
@foo @foo[1]
%bar %bar{"a"}
$foo.bar $foo.bar()
The basic rule of thumb seems to be shaping up that anything more
complicated than a simple scalar variable must always end with something
bracketed. (And in the case of closure {...}, that's the whole thing.)
Hmm. That makes me wonder what the slice notation for "everything" is.
Larry