On 5/14/05, Rod Adams <[EMAIL PROTECTED]> wrote:
> Jonathan Worthington wrote:
> 
> > "Brent 'Dax' Royal-Gordon" <[EMAIL PROTECTED]> wrote:
> >
> >> Like the decision about which side of the road cars should drive on,
> >> it really doesn't matter *which* choice is taken, as long as
> >> *something* is decided.
> >
> > The only thing is, there already is a decided way to do it so far as I
> > can see...
> 
> I think the thing most people see wrong with $?SELF is that it's a
> huffman level of 6, all shifted (on std US keyboards, at least). It's a
> 7 when you add the dot. I'm not sure if it deserves a huffman level of 1
> (a la ^), but I would think 2 or 3 is merited. While I agree almost
> entirely with Damian's post, I have to say that these days it's
> annoyingly common for projects to force a OO paradigm. In the OO code I
> write, there tend to be a handful of "heavy" methods, which tend not to
> call other methods, and a heaping handful of "light" 1-5 line wrapper
> methods which coordinate the calling of the heavy methods. (The heavy
> methods tend to be "private" and the workhorses, the light methods
> provide the public interface). I'm certain that others structure their
> code differently.
> 
> That said, what I believe I've heard as the major hold up all the
> shortened versions is that there is no general consensus on what it
> should be. So I propose a list of the options, and have people sound off
> as being Favorable/Neutral/Unfavorable on each, to get a feel for where
> people on this list actually stand on the issue.
> 
> Here's the list as I've heard them:
> 
> $?SELF, and nothing else by default.
> 
> $_ bound to $?SELF at start of method.
> 
> o.
> 
> O.
> 
> this.
> 
> self.
> 
> me.
> 
> ^
> 
> ->
> 
> _
> 
> ° (an idea I just had. would likely need a 7-bit option as well)
> 
> ..

What's wrong with just defaulting to $self? That's standard P5 OO,
expected everywhere, and you can rename it if you want in the method
definition (which is a nice place). None of this package-global "use
self ^;" stuff that's both magic-at-a-distance and lexically scoped.
("no self ^;" anyone?)

You can't huffman-code everything to 0 everywhere. $self is 5
characters, well-known, very similar to other languages (like JS,
Java, and C++) and only one of the characters is shifted.

Rob

Reply via email to