develooper Front page | perl.perl6.language | Postings from May 2005

./method

Thread Next
From:
Juerd
Date:
May 15, 2005 04:44
Subject:
./method
Message ID:
20050515114444.GH18368@c4.convolution.nl
A few days ago, when typing ./pugs,... You can guess the rest :)

I suggest

    ./method

to mean $?SELF.method, and

    ../method

to mean $?SELF.SUPER::method, or however that's normally written.

This syntax doesn't clash with anything, doesn't introduce whitespace
asymmetry and doesn't require anything other than ASCII.

If you go back to what inspired it, the mnemonic becomes clear: unix
filesystems. However, it's far fetched and none of the people I've asked
think it's a good one. Still, it works for me and may even work in
textbooks.

The best thing about this new proposal is that everyone so far agrees
that it's feasible, easy to write and not ugly.

(Note that "./" and "../" are prefix operators, and unlike ".?", ".*",
".+" and ".=", cannot be used infix. In fact, it requires that "?", "*",
"+" and "=" be thought of as meta-operators to ".", and from now on, to
"./" and "../" as well, so you get "./+method". This isn't as complex as
it looks right now.)

Your opinions please! (I ask those who already responded off-list, to
repeat their opinion here)


Juerd
-- 
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html 
http://convolution.nl/gajigu_juerd_n.html

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About