On Tue, Feb 05, 2008 at 10:42:35AM -0800, Jonathan Lang wrote:
: > +++ doc/trunk/design/syn/S03.pod        Tue Feb  5 09:55:29 2008
: > @@ -2791,7 +2791,7 @@
: >  are insufficient for defining the "pecking order" of code.  Note that
: >  you can bind to either a bare block or a pointy block.  Binding to a
: >  bare block conveniently leaves the topic in C<$_>, so the final form
: > -above is equivalent to a C<default>.  (Placeholders parameters may
: > +above is equivalent to a C<default>.  (Placeholder parameters may
: >  also be used in the bare block form, though of course their types
: >  cannot be specified that way.)
: 
: Is it forbidden to use placeholder parameters in conjunction with
: "my"?  Or would it simply not do anything useful?  I ask because "Do
: what I mean" would seem to imply that 'my Dog $^foo' would specify
: $^foo's type as 'Dog'.  Though if you start doing too much of that,
: you're almost certainly better off explicitly defining a signature.

Indeed.

: Also, how much trouble would we get in if we spelled the ubiquitous
: alias for a method's invocant as C< $^_ > instead of C< $self >?

Then we're back to confusing people over the difference between the
object and the topic, and the topic-as-self breaks as soon as you
topicalize some other way.  And you can always throw in a "$_ := self"
or a "given self" if you really want it.  Plus $.foo is still only
one character longer than .foo so it doesn't really get you much most
of the time.

Larry

Reply via email to