Autrijus Tang wrote:
Juerd informed me today that .method should still means $_.method.

However, for the OO modules we're writing, there still needs to be a way
to invoke methods on the current invocant, when the invocant name has
been omitted from the method() declaration.

Currently Pugs has:

    $?SELF.method
    ^method

Is any of the two forms considered canonical?  Or is there some other
alternatives?

I must say after the previous conversation leaning towards .method == $?SELF.method I was stunned to see it had flipped back further than where we started last time...


I don't mean to be disrespectful, but what was whoever suggested ^ thinking? For starters, about the only combination harder to hit with on spanned hand might be ctrl-F5. You really have to stretch quite hard to hit it. The current requirement of $, -, and > at least contains _relatively_ easy to reach characters.

Having read back through some recent archives, it seems that we are selling out the option to provide a basic, clean, symmetric, OO for the sake what seems basically like a sexy way to do...

if ( $foo == 1 ) {

} elsif ( $foo == 2 ) {

}

If we aren't going to make the invocant method . like everyone else expects, can I at least have -> back?

At some point we just end up with it being not maintainable enough by "normal" programmers, and so we end up falling back on ...

method ($self: $string) {
        $self.method;
        $self.method;
}

...because doing it implicitly just isn't readable, and is going to give me RSI. Huffman would be turning in his grave.

I don't know if I get a vote, but I write about 25,000 sloc of Perl code a year, and I'd MUCH rather have clean, simple and terse OO than sexy control structures.

And please, from another thread, can someone please explain exactly what the [>>+^=<<] operator does? Not what it's components are, but as a whole. Trying to work it out from a description is giving me flashbacks of trying to understand haskell in an afternoon.

Maybe I'm just a bit testy from not sleeping in the last 36 hours, but I'm willing to accept a lot of things as long as we don't treat OO like a second class citizen WRT notation.

Every time I look at it .method just seems both obvious and symmetrical, and yet we people keep wanting to give it up because some trickier thing gets a bit uglier...

Is there any way we could prioritize based on frequency? We're accumulating quite a little library of P6 code now. What are people actually _using_ the most?

What gets used in CPAN? How many $self->method calls are there compared to grep {} and map {}?

/me goes back to work

Regards

Adam K

Reply via email to