Front page | perl.perl6.language |
Postings from June 2005
Re: ./method <defunct>
From: Jonathan Scott Duff
June 21, 2005 08:00
Re: ./method <defunct>
Message ID: 20050621150018.GB10309@pobox.com
On Mon, Jun 20, 2005 at 07:34:57PM -0400, Kurt wrote:
> On 6/18/05, Juerd wrote:
> > Why exactly is the slash not acceptable for you? Almost everyone has
> > said they like it. I personally find ./method prettier and easier to
> > type than any of the alternatives.
> I don't like it because I think method calls should look like method calls,
> and the slash separating the dot and name makes it look like something else
> On 6/19/05, Juerd wrote:
> > David Storrs skribis 2005-06-19 13:45 (-0400):
> > > All that said, I still agree with John... './' does not look like
> > > method call syntax to me.
> > That's good, because it's different from all other method syntax anyway,
> > because it does not have any left hand side -- not even implied.
> I don't think it's good. A method call should look like a method call.
What are the salient characteristics of "looks like a method call"?
Is it "no intervening characters between the . and the name of the
> Frankly, I don't understand the objection to using a keyword for $?SELF,
> such as `self`.
Um ... isn't $?SELF a "keyword"? :-)
> Most other object-oriented languages use such a keyword, if
> not exactly the same one, so it will be a familiar concept. Certainly more
> readily understood for a newcomer than `./method`.
I think the difference in how readily understood it is will be
infinitesimally small. What's confusing about "./method is shorthand
> As a bonus, `self` is
> easily searchable within the documentation, whereas `./` is not.
I'll grant you that. But, as punctuation rich as perl is, we should
provide a tool (p6doc?) to help with the searching and encourage
people to use it.
> I missed responding to the thread the last time this subject came up, but
> the more I see this syntax the less I like it, so I wanted to add another
> voice to the dissention. However, if it remains official, I expect I'll
> simply be naming my invocants, as chromatic has suggested.
I expect that soon after perl6 is released (heck, maybe before it's
released) we'll get tools that will translate perl6 to perl6 while
performing some syntactic manipulation. For instance, it could
"explicitize" code (replacing ./method with $?SELf.method and .foo
with $_.foo and so on)
Jonathan Scott Duff